]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/50310 (ICE: in gen_vcondv2div2df, at config/i386/sse.md:1435...
authorMichael Meissner <meissner@linux.vnet.ibm.com>
Tue, 6 Mar 2012 20:48:52 +0000 (20:48 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Tue, 6 Mar 2012 20:48:52 +0000 (20:48 +0000)
2012-03-05  Michael Meissner  <meissner@linux.vnet.ibm.com>

Backport from mainline
2012-03-06  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/50310
* config/rs6000/vector.md (vector_uneq<mode>): Add support for
UNEQ, LTGT, ORDERED, and UNORDERED IEEE vector comparisons.
(vector_ltgt<mode>): Likewise.
(vector_ordered<mode>): Likewise.
(vector_unordered<mode>): Likewise.
* config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner):
Likewise.

From-SVN: r185016

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/vector.md

index fb6c92c84a23ac7dc2bb3c256e7fc14d41fe474f..b1f0e5d035b49d235dd6ef0a7e659a2689752275 100644 (file)
@@ -1,3 +1,17 @@
+2012-03-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+       Backport from mainline
+       2012-03-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+       PR target/50310
+       * config/rs6000/vector.md (vector_uneq<mode>): Add support for
+       UNEQ, LTGT, ORDERED, and UNORDERED IEEE vector comparisons.
+       (vector_ltgt<mode>): Likewise.
+       (vector_ordered<mode>): Likewise.
+       (vector_unordered<mode>): Likewise.
+       * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner):
+       Likewise.
+
 2012-03-04  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        Backport from mainline
index 7083584a28eeb7e258a63d991800f17d4d79554d..285435d2517b9cdd2cb0a60bdd24325da53e4540 100644 (file)
@@ -15803,6 +15803,10 @@ rs6000_emit_vector_compare_inner (enum rtx_code code, rtx op0, rtx op1)
     case EQ:
     case GT:
     case GTU:
+    case ORDERED:
+    case UNORDERED:
+    case UNEQ:
+    case LTGT:
       mask = gen_reg_rtx (mode);
       emit_insn (gen_rtx_SET (VOIDmode,
                              mask,
index 73d2ae0f77eff9f2a33115d7a1c7ee12c863a457..4ad56064bc327e05fc1da156e195ee465d5d4daa 100644 (file)
   "VECTOR_UNIT_ALTIVEC_P (<MODE>mode)"
   "")
 
+(define_insn_and_split "*vector_uneq<mode>"
+  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
+       (uneq:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
+                   (match_operand:VEC_F 2 "vfloat_operand" "")))]
+  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
+  "#"
+  ""
+  [(set (match_dup 3)
+       (gt:VEC_F (match_dup 1)
+                 (match_dup 2)))
+   (set (match_dup 4)
+       (gt:VEC_F (match_dup 2)
+                 (match_dup 1)))
+   (set (match_dup 0)
+       (not:VEC_F (ior:VEC_F (match_dup 3)
+                             (match_dup 4))))]
+  "
+{
+  operands[3] = gen_reg_rtx (<MODE>mode);
+  operands[4] = gen_reg_rtx (<MODE>mode);
+}")
+
+(define_insn_and_split "*vector_ltgt<mode>"
+  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
+       (ltgt:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
+                   (match_operand:VEC_F 2 "vfloat_operand" "")))]
+  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
+  "#"
+  ""
+  [(set (match_dup 3)
+       (gt:VEC_F (match_dup 1)
+                 (match_dup 2)))
+   (set (match_dup 4)
+       (gt:VEC_F (match_dup 2)
+                 (match_dup 1)))
+   (set (match_dup 0)
+       (ior:VEC_F (match_dup 3)
+                  (match_dup 4)))]
+  "
+{
+  operands[3] = gen_reg_rtx (<MODE>mode);
+  operands[4] = gen_reg_rtx (<MODE>mode);
+}")
+
+(define_insn_and_split "*vector_ordered<mode>"
+  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
+       (ordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
+                      (match_operand:VEC_F 2 "vfloat_operand" "")))]
+  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
+  "#"
+  ""
+  [(set (match_dup 3)
+       (ge:VEC_F (match_dup 1)
+                 (match_dup 2)))
+   (set (match_dup 4)
+       (ge:VEC_F (match_dup 2)
+                 (match_dup 1)))
+   (set (match_dup 0)
+       (ior:VEC_F (match_dup 3)
+                  (match_dup 4)))]
+  "
+{
+  operands[3] = gen_reg_rtx (<MODE>mode);
+  operands[4] = gen_reg_rtx (<MODE>mode);
+}")
+
+(define_insn_and_split "*vector_unordered<mode>"
+  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
+       (unordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
+                        (match_operand:VEC_F 2 "vfloat_operand" "")))]
+  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
+  "#"
+  ""
+  [(set (match_dup 3)
+       (ge:VEC_F (match_dup 1)
+                 (match_dup 2)))
+   (set (match_dup 4)
+       (ge:VEC_F (match_dup 2)
+                 (match_dup 1)))
+   (set (match_dup 0)
+       (not:VEC_F (ior:VEC_F (match_dup 3)
+                             (match_dup 4))))]
+  "
+{
+  operands[3] = gen_reg_rtx (<MODE>mode);
+  operands[4] = gen_reg_rtx (<MODE>mode);
+}")
+
 ;; Note the arguments for __builtin_altivec_vsel are op2, op1, mask
 ;; which is in the reverse order that we want
 (define_expand "vector_select_<mode>"