From: Alexander Ivchenko Date: Tue, 14 Oct 2014 08:19:17 +0000 (+0000) Subject: AVX-512. 60/n. Update 128bit ashrv insn pattern. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06ba0585d67cf607a5141d5bfcd4a6a67607ae70;p=gcc.git AVX-512. 60/n. Update 128bit ashrv insn pattern. gcc/ * config/i386/sse.md (define_mode_iterator VI128_128 [V16QI V8HI V2DI]): Delete. (define_expand "vashr3"): Add masking, use VI12_128 mode iterator. (define_expand "ashrv2di3"): New. Co-Authored-By: Andrey Turetskiy Co-Authored-By: Anna Tikhonova Co-Authored-By: Ilya Tocar Co-Authored-By: Ilya Verbin Co-Authored-By: Kirill Yukhin Co-Authored-By: Maxim Kuznetsov Co-Authored-By: Michael Zolotukhin From-SVN: r216178 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ee1d70950e..18cefaf2a89 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2014-10-14 Alexander Ivchenko + Maxim Kuznetsov + Anna Tikhonova + Ilya Tocar + Andrey Turetskiy + Ilya Verbin + Kirill Yukhin + Michael Zolotukhin + + * config/i386/sse.md + (define_mode_iterator VI128_128 [V16QI V8HI V2DI]): Delete. + (define_expand "vashr3"): Add masking, + use VI12_128 mode iterator. + (define_expand "ashrv2di3"): New. + 2014-10-14 Alexander Ivchenko Maxim Kuznetsov Anna Tikhonova diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 99fd5cf75ff..f4586d94da9 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -503,7 +503,6 @@ (define_mode_iterator VI12_128 [V16QI V8HI]) (define_mode_iterator VI14_128 [V16QI V4SI]) (define_mode_iterator VI124_128 [V16QI V8HI V4SI]) -(define_mode_iterator VI128_128 [V16QI V8HI V2DI]) (define_mode_iterator VI24_128 [V8HI V4SI]) (define_mode_iterator VI248_128 [V8HI V4SI V2DI]) (define_mode_iterator VI48_128 [V4SI V2DI]) @@ -15529,17 +15528,36 @@ (match_operand:VI48_256 2 "nonimmediate_operand")))] "TARGET_AVX2") -(define_expand "vashr3" - [(set (match_operand:VI128_128 0 "register_operand") - (ashiftrt:VI128_128 - (match_operand:VI128_128 1 "register_operand") - (match_operand:VI128_128 2 "nonimmediate_operand")))] - "TARGET_XOP" +(define_expand "vashr3" + [(set (match_operand:VI12_128 0 "register_operand") + (ashiftrt:VI12_128 + (match_operand:VI12_128 1 "register_operand") + (match_operand:VI12_128 2 "nonimmediate_operand")))] + "TARGET_XOP || (TARGET_AVX512BW && TARGET_AVX512VL)" { - rtx neg = gen_reg_rtx (mode); - emit_insn (gen_neg2 (neg, operands[2])); - emit_insn (gen_xop_sha3 (operands[0], operands[1], neg)); - DONE; + if (TARGET_XOP) + { + rtx neg = gen_reg_rtx (mode); + emit_insn (gen_neg2 (neg, operands[2])); + emit_insn (gen_xop_sha3 (operands[0], operands[1], neg)); + DONE; + } +}) + +(define_expand "vashrv2di3" + [(set (match_operand:V2DI 0 "register_operand") + (ashiftrt:V2DI + (match_operand:V2DI 1 "register_operand") + (match_operand:V2DI 2 "nonimmediate_operand")))] + "TARGET_XOP || TARGET_AVX512VL" +{ + if (TARGET_XOP) + { + rtx neg = gen_reg_rtx (V2DImode); + emit_insn (gen_negv2di2 (neg, operands[2])); + emit_insn (gen_xop_shav2di3 (operands[0], operands[1], neg)); + DONE; + } }) (define_expand "vashrv4si3"