diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-05-22 12:28:06 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-05-22 12:28:06 +0200 |
commit | af120161421cdc935ff98a0e5038775f22a1ca90 (patch) | |
tree | 3375b47ec53d429263419273a7c46535e1ff0972 /gcc/config/i386 | |
parent | 355023cef148556c55768da653b191d826cb6853 (diff) | |
download | gcc-af120161421cdc935ff98a0e5038775f22a1ca90.zip gcc-af120161421cdc935ff98a0e5038775f22a1ca90.tar.gz gcc-af120161421cdc935ff98a0e5038775f22a1ca90.tar.bz2 |
sse.md (vec_set_lo_<mode><mask_name>, [...]): Add && <mask_avx512dq_condition> condition.
* config/i386/sse.md (vec_set_lo_<mode><mask_name>,
vec_set_hi_<mode><mask_name>): Add && <mask_avx512dq_condition>
condition. For !TARGET_AVX512DQ, emit 32x4 instruction instead
of 64x2.
* gcc.target/i386/avx512dq-vinsert-1.c: New test.
* gcc.target/i386/avx512vl-vinsert-1.c: New test.
From-SVN: r236569
Diffstat (limited to 'gcc/config/i386')
-rw-r--r-- | gcc/config/i386/sse.md | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index b13dff8..745b6b6 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -17818,10 +17818,12 @@ (vec_select:<ssehalfvecmode> (match_operand:VI8F_256 1 "register_operand" "v") (parallel [(const_int 2) (const_int 3)]))))] - "TARGET_AVX" + "TARGET_AVX && <mask_avx512dq_condition>" { - if (TARGET_AVX512VL) + if (TARGET_AVX512DQ) return "vinsert<shuffletype>64x2\t{$0x0, %2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2, 0x0}"; + else if (TARGET_AVX512VL) + return "vinsert<shuffletype>32x4\t{$0x0, %2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2, 0x0}"; else return "vinsert<i128>\t{$0x0, %2, %1, %0|%0, %1, %2, 0x0}"; } @@ -17838,10 +17840,12 @@ (match_operand:VI8F_256 1 "register_operand" "v") (parallel [(const_int 0) (const_int 1)])) (match_operand:<ssehalfvecmode> 2 "nonimmediate_operand" "vm")))] - "TARGET_AVX" + "TARGET_AVX && <mask_avx512dq_condition>" { - if (TARGET_AVX512VL) + if (TARGET_AVX512DQ) return "vinsert<shuffletype>64x2\t{$0x1, %2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2, 0x1}"; + else if (TARGET_AVX512VL) + return "vinsert<shuffletype>32x4\t{$0x1, %2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2, 0x1}"; else return "vinsert<i128>\t{$0x1, %2, %1, %0|%0, %1, %2, 0x1}"; } |