From: Uros Bizjak Date: Thu, 16 Mar 2023 19:41:55 +0000 (+0100) Subject: i386: Robustify vec perm blend functions for TARGET_MMX_WITH_SSE X-Git-Tag: basepoints/gcc-14~490 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=acff89c7d7b3af3553a4fb878b2fd767dd27d830;p=thirdparty%2Fgcc.git i386: Robustify vec perm blend functions for TARGET_MMX_WITH_SSE 8-byte modes should be processed only for TARGET_MMX_WITH_SSE. gcc/ChangeLog: * config/i386/i386-expand.cc (expand_vec_perm_pblendv): Handle 8-byte modes only with TARGET_MMX_WITH_SSE. (expand_vec_perm_2perm_pblendv): Ditto. --- diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc index 1545d4365b76..c1300dc4e26d 100644 --- a/gcc/config/i386/i386-expand.cc +++ b/gcc/config/i386/i386-expand.cc @@ -20288,9 +20288,10 @@ expand_vec_perm_pblendv (struct expand_vec_perm_d *d) ; else if (TARGET_AVX && (vmode == V4DFmode || vmode == V8SFmode)) ; - else if (TARGET_SSE4_1 && (GET_MODE_SIZE (vmode) == 4 - || GET_MODE_SIZE (vmode) == 8 - || GET_MODE_SIZE (vmode) == 16)) + else if (TARGET_SSE4_1 + && (GET_MODE_SIZE (vmode) == 16 + || (TARGET_MMX_WITH_SSE && GET_MODE_SIZE (vmode) == 8) + || GET_MODE_SIZE (vmode) == 4)) ; else return false; @@ -21154,9 +21155,10 @@ expand_vec_perm_2perm_pblendv (struct expand_vec_perm_d *d, bool two_insn) ; else if (TARGET_AVX && (vmode == V4DFmode || vmode == V8SFmode)) ; - else if (TARGET_SSE4_1 && (GET_MODE_SIZE (vmode) == 16 - || GET_MODE_SIZE (vmode) == 8 - || GET_MODE_SIZE (vmode) == 4)) + else if (TARGET_SSE4_1 + && (GET_MODE_SIZE (vmode) == 16 + || (TARGET_MMX_WITH_SSE && GET_MODE_SIZE (vmode) == 8) + || GET_MODE_SIZE (vmode) == 4)) ; else return false;