re PR target/79951 (ICE in extract_insn, at recog.c:2311 on ppc64le with -mno-cmpb)
authorPat Haugen <pthaugen@us.ibm.com>
Fri, 17 Mar 2017 16:42:29 +0000 (16:42 +0000)
committerPat Haugen <pthaugen@gcc.gnu.org>
Fri, 17 Mar 2017 16:42:29 +0000 (16:42 +0000)
PR target/79951
* config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
for VECTOR_UNIT_VSX_P (<MODE>mode) too.
* gcc.target/powerpc/pr79951.c: New.

From-SVN: r246228

gcc/ChangeLog
gcc/config/rs6000/rs6000.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/pr79951.c [new file with mode: 0644]

index eb0e150d051477b8bea5efda997eb11bb4093c5f..2ea7fe8d61ae3a0ff1df6d91d5332334500ec23c 100644 (file)
@@ -1,3 +1,9 @@
+2017-03-17  Pat Haugen  <pthaugen@us.ibm.com>
+
+       PR target/79951
+       * config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
+       for VECTOR_UNIT_VSX_P (<MODE>mode) too.
+
 2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
 
        * reload.c (find_reloads): When reloading a nonoffsettable address,
index 000d84033c3faf5df7de941b14d32e40c66f3aaa..164fc2c33c6acc23eecc3eabe2e8e582f341f0b4 100644 (file)
        (unspec:SFDF [(match_operand:SFDF 1 "gpc_reg_operand" "<Ff>,<Fv>")
                      (match_operand:SFDF 2 "gpc_reg_operand" "<Ff>,<Fv>")]
                     UNSPEC_COPYSIGN))]
-  "TARGET_<MODE>_FPR && TARGET_CMPB"
+  "TARGET_<MODE>_FPR && (TARGET_CMPB || VECTOR_UNIT_VSX_P (<MODE>mode))"
   "@
    fcpsgn %0,%2,%1
    xscpsgndp %x0,%x2,%x1"
index 4162ca23eedc89fb16f054d38dc93c948cf4d941..7178b8e4f51ade4bac9416746ade461555e073cd 100644 (file)
@@ -1,3 +1,8 @@
+2017-03-17  Pat Haugen  <pthaugen@us.ibm.com>
+
+       PR target/79951
+       * gcc.target/powerpc/pr79951.c: New.
+
 2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
 
        PR rtl-optimization/79910
diff --git a/gcc/testsuite/gcc.target/powerpc/pr79951.c b/gcc/testsuite/gcc.target/powerpc/pr79951.c
new file mode 100644 (file)
index 0000000..6783744
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -S -mno-cmpb" } */
+
+float testf (float x, float y)
+{
+  return __builtin_copysignf (x, y);
+}
+