]> gcc.gnu.org Git - gcc.git/commitdiff
re PR target/81348 (PowerPC64: Code built with -mcpu=power9 hits SEGV in RTL split2)
authorMichael Meissner <meissner@linux.vnet.ibm.com>
Fri, 7 Jul 2017 17:02:58 +0000 (17:02 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Fri, 7 Jul 2017 17:02:58 +0000 (17:02 +0000)
[gcc]
2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/81348
* config/rs6000/rs6000.md (HI sign_extend splitter): Use the
correct operand in doing the split.

[gcc/testsuite]
2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/81348
* gcc.target/powerpc/pr81348.c: New test.

From-SVN: r250054

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

index 1a78572a1dd80972cd6bca13cb562eaf59faeb35..85cb86409b49e9a8f1c670e8f265ece3cda26364 100644 (file)
@@ -1,3 +1,9 @@
+2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+       PR target/81348
+       * config/rs6000/rs6000.md (HI sign_extend splitter): Use the
+       correct operand in doing the split.
+
 2017-07-07 Carl Love  <cel@us.ibm.com>
 
        * config/rs6000/rs6000-c: Add support for built-in function
index f78dbf913ecf1f604782ad370b653e811ba523b6..2fd9ef0f1688b966d03a1477b9e3867927fc7824 100644 (file)
    (set (match_dup 0)
        (sign_extend:EXTHI (match_dup 2)))]
 {
-  operands[2] = gen_rtx_REG (HImode, REGNO (operands[1]));
+  operands[2] = gen_rtx_REG (HImode, REGNO (operands[0]));
 })
 
 (define_insn_and_split "*extendhi<mode>2_dot"
index b6f6f80323fee4d09e8bb1692e8b4c0e99056af7..cc0e5b89b23b7a8d8c27f6b4e7c2248ad72fc228 100644 (file)
@@ -1,3 +1,8 @@
+2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+       PR target/81348
+       * gcc.target/powerpc/pr81348.c: New test.
+
 2017-07-07  Szabolcs Nagy  <szabolcs.nagy@arm.com>
 
        * gfortran.dg/vect/pr60510.f: Require vect_double support.
diff --git a/gcc/testsuite/gcc.target/powerpc/pr81348.c b/gcc/testsuite/gcc.target/powerpc/pr81348.c
new file mode 100644 (file)
index 0000000..e8e10bb
--- /dev/null
@@ -0,0 +1,24 @@
+/* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-options "-mcpu=power9 -Og" } */
+
+/* PR target/81348: Compiler died in doing short->float conversion due to using
+   the wrong register in a define_split.  */
+
+int a;
+short b;
+float ***c;
+
+void d(void)
+{
+        int e = 3;
+
+        if (a)
+                e = b;
+
+        ***c = e;
+}
+
+/* { dg-final { scan-assembler {\mlxsihzx\M}  } } */
+/* { dg-final { scan-assembler {\mvextsh2d\M} } } */
This page took 0.114038 seconds and 5 git commands to generate.