re PR target/83332 (new test case gfortran.dg/vect/pr81303.f fails (r255499))
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Tue, 12 Dec 2017 20:44:57 +0000 (20:44 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Tue, 12 Dec 2017 20:44:57 +0000 (20:44 +0000)
2017-12-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR target/83332
* config/rs6000/vector.md (vcondv2dfv2di): New define_expand.
(vcondv2div2df): Likewise.
(vconduv2dfv2di): Likewise.

From-SVN: r255588

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

index b04e6fd..7415fa9 100644 (file)
@@ -1,3 +1,10 @@
+2017-12-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       PR target/83332
+       * config/rs6000/vector.md (vcondv2dfv2di): New define_expand.
+       (vcondv2div2df): Likewise.
+       (vconduv2dfv2di): Likewise.
+
 2017-12-12  Jakub Jelinek  <jakub@redhat.com>
 
        * builtins.def (BUILT_IN_NEXTAFTER, BUILT_IN_NEXTAFTERF,
index 5a9b1a8..35bd892 100644 (file)
     FAIL;
 }")
 
+(define_expand "vcondv2dfv2di"
+  [(set (match_operand:V2DF 0 "vfloat_operand")
+       (if_then_else:V2DF
+        (match_operator 3 "comparison_operator"
+                        [(match_operand:V2DI 4 "vint_operand")
+                         (match_operand:V2DI 5 "vint_operand")])
+        (match_operand:V2DF 1 "vfloat_operand")
+        (match_operand:V2DF 2 "vfloat_operand")))]
+  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (V2DFmode)
+   && VECTOR_UNIT_ALTIVEC_OR_VSX_P (V2DImode)"
+{
+  if (rs6000_emit_vector_cond_expr (operands[0], operands[1], operands[2],
+                                   operands[3], operands[4], operands[5]))
+    DONE;
+  else
+    FAIL;
+})
+
+(define_expand "vcondv2div2df"
+  [(set (match_operand:V2DI 0 "vint_operand")
+       (if_then_else:V2DI
+        (match_operator 3 "comparison_operator"
+                        [(match_operand:V2DF 4 "vfloat_operand")
+                         (match_operand:V2DF 5 "vfloat_operand")])
+        (match_operand:V2DI 1 "vint_operand")
+        (match_operand:V2DI 2 "vint_operand")))]
+  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (V2DFmode)
+   && VECTOR_UNIT_ALTIVEC_OR_VSX_P (V2DImode)"
+{
+  if (rs6000_emit_vector_cond_expr (operands[0], operands[1], operands[2],
+                                   operands[3], operands[4], operands[5]))
+    DONE;
+  else
+    FAIL;
+})
+
 (define_expand "vcondu<mode><mode>"
   [(set (match_operand:VEC_I 0 "vint_operand")
        (if_then_else:VEC_I
     FAIL;
 }")
 
+(define_expand "vconduv2dfv2di"
+  [(set (match_operand:V2DF 0 "vfloat_operand")
+       (if_then_else:V2DF
+        (match_operator 3 "comparison_operator"
+                        [(match_operand:V2DI 4 "vint_operand")
+                         (match_operand:V2DI 5 "vint_operand")])
+        (match_operand:V2DF 1 "vfloat_operand")
+        (match_operand:V2DF 2 "vfloat_operand")))]
+  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (V2DFmode)
+   && VECTOR_UNIT_ALTIVEC_OR_VSX_P (V2DImode)"
+{
+  if (rs6000_emit_vector_cond_expr (operands[0], operands[1], operands[2],
+                                   operands[3], operands[4], operands[5]))
+    DONE;
+  else
+    FAIL;
+})
+
 (define_expand "vector_eq<mode>"
   [(set (match_operand:VEC_C 0 "vlogical_operand" "")
        (eq:VEC_C (match_operand:VEC_C 1 "vlogical_operand" "")