]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sse.md (avx_cmps<ssemodesuffixf2c><mode>3): Add missing output register constraint.
authorUros Bizjak <ubizjak@gmail.com>
Thu, 7 Apr 2011 21:50:05 +0000 (23:50 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 7 Apr 2011 21:50:05 +0000 (23:50 +0200)
* config/i386/sse.md (avx_cmps<ssemodesuffixf2c><mode>3): Add
missing output register constraint.
(*vec_concatv2sf_avx): Fix wrong register constraint in
alternative 3 of operand 1.
(*vec_set<mode>_0_avx): Avoid combining registers from different
units in a single alternative.
(*vec_set<mode>_0_sse4_1): Ditto.
(*vec_set<mode>_0_sse2): Ditto.
(vec_set<mode>_0): Ditto.
(sse2_storehpd): Ditto.
(sse2_loadhpd): Ditto.
(sse4_1_insertps): Use nonimmediate_operand for operand 2.
* config/i386/predicates.md (sse_comparison_operator): Do not
define as special predicate.

From-SVN: r172150

gcc/ChangeLog
gcc/config/i386/predicates.md
gcc/config/i386/sse.md

index 3611039e1d649e0c498ce968e9be18316345a217..b8d07e93ccf22ffd4705d4808236fb83ec9e5db4 100644 (file)
@@ -1,3 +1,20 @@
+2011-04-07  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/sse.md (avx_cmps<ssemodesuffixf2c><mode>3): Add
+       missing output register constraint.
+       (*vec_concatv2sf_avx): Fix wrong register constraint in
+       alternative 3 of operand 1.
+       (*vec_set<mode>_0_avx): Avoid combining registers from different
+       units in a single alternative.
+       (*vec_set<mode>_0_sse4_1): Ditto.
+       (*vec_set<mode>_0_sse2): Ditto.
+       (vec_set<mode>_0): Ditto.
+       (sse2_storehpd): Ditto.
+       (sse2_loadhpd): Ditto.
+       (sse4_1_insertps): Use nonimmediate_operand for operand 2.
+       * config/i386/predicates.md (sse_comparison_operator): Do not
+       define as special predicate.
+
 2011-04-07  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
index 83f5e5dac314ff759ccb426ded4c2d39d8928592..cc5dd8a0738890482eacb6fd5f72edb7180cf4d4 100644 (file)
 ;; Return 1 if OP is a comparison that can be used in the CMPSS/CMPPS insns.
 ;; The first set are supported directly; the second set can't be done with
 ;; full IEEE support, i.e. NaNs.
-;;
-;; ??? It would seem that we have a lot of uses of this predicate that pass
-;; it the wrong mode.  We got away with this because the old function didn't
-;; check the mode at all.  Mirror that for now by calling this a special
-;; predicate.
 
-(define_special_predicate "sse_comparison_operator"
+(define_predicate "sse_comparison_operator"
   (match_code "eq,lt,le,unordered,ne,unge,ungt,ordered"))
 
 ;; Return 1 if OP is a comparison operator that can be issued by
index e85ffd9d68d8b7a8ede0ab92cca3c458969be08b..56e5e1b80980685c6ca00857be16701fcf19eea3 100644 (file)
    (set_attr "mode" "<MODE>")])
 
 (define_insn "avx_cmps<ssemodesuffixf2c><mode>3"
-  [(set (match_operand:SSEMODEF2P 0 "register_operand" "")
+  [(set (match_operand:SSEMODEF2P 0 "register_operand" "=x")
        (vec_merge:SSEMODEF2P
          (unspec:SSEMODEF2P
            [(match_operand:SSEMODEF2P 1 "register_operand" "x")
 (define_insn "*vec_concatv2sf_avx"
   [(set (match_operand:V2SF 0 "register_operand"     "=x,x,x,*y ,*y")
        (vec_concat:V2SF
-         (match_operand:SF 1 "nonimmediate_operand" " x,x,m, x , m")
+         (match_operand:SF 1 "nonimmediate_operand" " x,x,m, 0 , m")
          (match_operand:SF 2 "vector_move_operand"  " x,m,C,*ym, C")))]
   "TARGET_AVX"
   "@
   DONE;
 })
 
+;; Avoid combining registers from different units in a single alternative,
+;; see comment above inline_secondary_memory_needed function in i386.c
 (define_insn "*vec_set<mode>_0_avx"
-  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x,x, x,x,  x,m")
+  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x,x, x,x,  x,m, m,m")
        (vec_merge:SSEMODE4S
          (vec_duplicate:SSEMODE4S
            (match_operand:<ssescalarmode> 2
-             "general_operand"                            " x,m,*r,x,*rm,x*rfF"))
-         (match_operand:SSEMODE4S 1 "vector_move_operand" " C,C, C,x,  x,0")
+             "general_operand"                            " x,m,*r,x,*rm,x,*r,fF"))
+         (match_operand:SSEMODE4S 1 "vector_move_operand" " C,C, C,x,  x,0, 0,0")
          (const_int 1)))]
   "TARGET_AVX"
   "@
    vmovd\t{%2, %0|%0, %2}
    vmovss\t{%2, %1, %0|%0, %1, %2}
    vpinsrd\t{$0, %2, %1, %0|%0, %1, %2, 0}
+   #
+   #
    #"
-  [(set_attr "type" "sselog,ssemov,ssemov,ssemov,sselog,*")
-   (set_attr "prefix_extra" "*,*,*,*,1,*")
-   (set_attr "length_immediate" "*,*,*,*,1,*")
+  [(set_attr "type" "sselog,ssemov,ssemov,ssemov,sselog,*,*,*")
+   (set_attr "prefix_extra" "*,*,*,*,1,*,*,*")
+   (set_attr "length_immediate" "*,*,*,*,1,*,*,*")
    (set_attr "prefix" "vex")
-   (set_attr "mode" "SF,<ssescalarmode>,SI,SF,TI,*")])
+   (set_attr "mode" "SF,<ssescalarmode>,SI,SF,TI,*,*,*")])
 
+;; Avoid combining registers from different units in a single alternative,
+;; see comment above inline_secondary_memory_needed function in i386.c
 (define_insn "*vec_set<mode>_0_sse4_1"
-  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x,x, x,x,  x,m")
+  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x,x, x,x,  x, m,m")
        (vec_merge:SSEMODE4S
          (vec_duplicate:SSEMODE4S
            (match_operand:<ssescalarmode> 2
-             "general_operand"                            " x,m,*r,x,*rm,*rfF"))
-         (match_operand:SSEMODE4S 1 "vector_move_operand" " C,C, C,0,  0,0")
+             "general_operand"                            " x,m,*r,x,*rm,*r,fF"))
+         (match_operand:SSEMODE4S 1 "vector_move_operand" " C,C, C,0,  0, 0,0")
          (const_int 1)))]
   "TARGET_SSE4_1"
   "@
    movd\t{%2, %0|%0, %2}
    movss\t{%2, %0|%0, %2}
    pinsrd\t{$0, %2, %0|%0, %2, 0}
+   #
    #"
-  [(set_attr "type" "sselog,ssemov,ssemov,ssemov,sselog,*")
-   (set_attr "prefix_extra" "*,*,*,*,1,*")
-   (set_attr "length_immediate" "*,*,*,*,1,*")
-   (set_attr "mode" "SF,<ssescalarmode>,SI,SF,TI,*")])
+  [(set_attr "type" "sselog,ssemov,ssemov,ssemov,sselog,*,*")
+   (set_attr "prefix_extra" "*,*,*,*,1,*,*")
+   (set_attr "length_immediate" "*,*,*,*,1,*,*")
+   (set_attr "mode" "SF,<ssescalarmode>,SI,SF,TI,*,*")])
 
+;; Avoid combining registers from different units in a single alternative,
+;; see comment above inline_secondary_memory_needed function in i386.c
 (define_insn "*vec_set<mode>_0_sse2"
-  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x, x,x,m")
+  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x, x,x,m, m,m")
        (vec_merge:SSEMODE4S
          (vec_duplicate:SSEMODE4S
            (match_operand:<ssescalarmode> 2
-             "general_operand"                            " m,*r,x,x*rfF"))
-         (match_operand:SSEMODE4S 1 "vector_move_operand" " C, C,0,0")
+             "general_operand"                            " m,*r,x,x,*r,fF"))
+         (match_operand:SSEMODE4S 1 "vector_move_operand" " C, C,0,0, 0,0")
          (const_int 1)))]
   "TARGET_SSE2"
   "@
    mov<ssescalarmodesuffix2s>\t{%2, %0|%0, %2}
    movd\t{%2, %0|%0, %2}
    movss\t{%2, %0|%0, %2}
+   #
+   #
    #"
   [(set_attr "type" "ssemov")
-   (set_attr "mode" "<ssescalarmode>,SI,SF,*")])
+   (set_attr "mode" "<ssescalarmode>,SI,SF,*,*,*")])
 
+;; Avoid combining registers from different units in a single alternative,
+;; see comment above inline_secondary_memory_needed function in i386.c
 (define_insn "vec_set<mode>_0"
-  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x,x,m")
+  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x,x,m, m,m")
        (vec_merge:SSEMODE4S
          (vec_duplicate:SSEMODE4S
            (match_operand:<ssescalarmode> 2
-             "general_operand"                            " m,x,x*rfF"))
-         (match_operand:SSEMODE4S 1 "vector_move_operand" " C,0,0")
+             "general_operand"                            " m,x,x,*r,fF"))
+         (match_operand:SSEMODE4S 1 "vector_move_operand" " C,0,0, 0,0")
          (const_int 1)))]
   "TARGET_SSE"
   "@
    movss\t{%2, %0|%0, %2}
    movss\t{%2, %0|%0, %2}
+   #
+   #
    #"
   [(set_attr "type" "ssemov")
-   (set_attr "mode" "SF")])
+   (set_attr "mode" "SF,SF,*,*,*")])
 
 ;; A subset is vec_setv4sf.
 (define_insn "*vec_setv4sf_avx"
 
 (define_insn "sse4_1_insertps"
   [(set (match_operand:V4SF 0 "register_operand" "=x")
-       (unspec:V4SF [(match_operand:V4SF 2 "register_operand" "x")
+       (unspec:V4SF [(match_operand:V4SF 2 "nonimmediate_operand" "xm")
                      (match_operand:V4SF 1 "register_operand" "0")
                      (match_operand:SI 3 "const_0_to_255_operand" "n")]
                     UNSPEC_INSERTPS))]
    (set_attr "prefix" "vex")
    (set_attr "mode" "V1DF,V2DF,DF,DF,DF")])
 
+;; Avoid combining registers from different units in a single alternative,
+;; see comment above inline_secondary_memory_needed function in i386.c
 (define_insn "sse2_storehpd"
   [(set (match_operand:DF 0 "nonimmediate_operand"     "=m,x,x,*f,r")
        (vec_select:DF
    (set_attr "prefix" "vex")
    (set_attr "mode" "V1DF,V2DF,DF,DF,DF")])
 
+;; Avoid combining registers from different units in a single alternative,
+;; see comment above inline_secondary_memory_needed function in i386.c
 (define_insn "sse2_loadhpd"
   [(set (match_operand:V2DF 0 "nonimmediate_operand"     "=x,x,x,o,o,o")
        (vec_concat:V2DF
    (set_attr "prefix" "vex")
    (set_attr "mode" "DF,V1DF,V1DF,V1DF,DF,DF,DF")])
 
+;; Avoid combining registers from different units in a single alternative,
+;; see comment above inline_secondary_memory_needed function in i386.c
 (define_insn "sse2_loadlpd"
   [(set (match_operand:V2DF 0 "nonimmediate_operand"    "=x,x,x,x,x,m,m,m")
        (vec_concat:V2DF