]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
x86: fold two of vec_dupv2df<mask_name>'s alternatives
authorJan Beulich <jbeulich@suse.com>
Wed, 2 Aug 2023 09:04:37 +0000 (11:04 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 2 Aug 2023 09:04:37 +0000 (11:04 +0200)
By using Yvm in the source, both can be expressed in one.

gcc/

* config/i386/sse.md (vec_dupv2df<mask_name>): Fold the middle
two of the alternatives.

gcc/config/i386/sse.md

index 43afcfdc7502a76b8b939d0af72541b0cc6c17fc..ab455c3e2972e87e417d3d9ad86616f845718356 100644 (file)
    (set_attr "mode" "DF,DF,V1DF,V1DF,V1DF,V2DF,V1DF,V1DF,V1DF")])
 
 (define_insn "vec_dupv2df<mask_name>"
-  [(set (match_operand:V2DF 0 "register_operand"     "=x,x,v,v")
+  [(set (match_operand:V2DF 0 "register_operand"     "=x,v,v")
        (vec_duplicate:V2DF
-         (match_operand:DF 1 "nonimmediate_operand" "0,xm,vm,vm")))]
+         (match_operand:DF 1 "nonimmediate_operand" "0,Yvm,vm")))]
   "TARGET_SSE2"
   "@
    unpcklpd\t%0, %0
    %vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}
-   vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}
    vbroadcastsd\t{%1, }%g0<mask_operand2>{|, %1}"
-  [(set_attr "isa" "noavx,sse3,avx512vl,*")
-   (set_attr "type" "sselog1,ssemov,ssemov,ssemov")
-   (set_attr "prefix" "orig,maybe_vex,evex,evex")
-   (set_attr "mode" "V2DF,DF,DF,V8DF")
+  [(set_attr "isa" "noavx,sse3,*")
+   (set_attr "type" "sselog1,ssemov,ssemov")
+   (set_attr "prefix" "orig,maybe_evex,evex")
+   (set_attr "mode" "V2DF,DF,V8DF")
    (set (attr "enabled")
-       (cond [(eq_attr "alternative" "3")
+       (cond [(eq_attr "alternative" "2")
                 (symbol_ref "TARGET_AVX512F && !TARGET_AVX512VL
                              && !TARGET_PREFER_AVX256")
               (match_test "<mask_avx512vl_condition>")