re PR target/89827 (ICE: in convert_op, at config/i386/i386.c:2098 with -Os -maes)
authorUros Bizjak <ubizjak@gmail.com>
Tue, 26 Mar 2019 18:59:14 +0000 (19:59 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Tue, 26 Mar 2019 18:59:14 +0000 (19:59 +0100)
PR target/89827
* config/i386/i386.c (dimode_scalar_chain::convert_reg):
Also process XEXP (src, 0) of a shift insn.

testsuite/ChangeLog:

PR target/89827
* gcc.target/i386/pr89827.c: New test.

From-SVN: r269953

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr89827.c [new file with mode: 0644]

index 48e4c86943feaaad6f35349e5cabfd8ea2046a35..c83f88a949387affdd4b86e88348e319b83a35c2 100644 (file)
@@ -1,3 +1,9 @@
+2019-03-26  Uroš Bizjak  <ubizjak@gmail.com>
+
+       PR target/89827
+       * config/i386/i386.c (dimode_scalar_chain::convert_reg):
+       Also process XEXP (src, 0) of a shift insn.
+
 2019-03-26  Richard Biener  <rguenther@suse.de>
 
        * tree-inline.c (remap_gimple_stmt): Cache gimple_block.
index b5f20f1597ed56068571c02174af5fda8868bf95..3ea545732dfd1044b445afb3d2b79d6b279d8ede 100644 (file)
@@ -2040,6 +2040,7 @@ dimode_scalar_chain::convert_reg (unsigned regno)
 
                emit_insn_before (seq, insn);
 
+               XEXP (src, 0) = replace_with_subreg (XEXP (src, 0), reg, reg);
                XEXP (src, 1) = gen_rtx_SUBREG (DImode, tmp2, 0);
              }
            else if (!MEM_P (dst) || !REG_P (src))
index 16bfddf5acc704c099051bc46c1348c8bea18ff7..2048487d876e549c2f0030b9e9502a377119a1ce 100644 (file)
@@ -1,3 +1,8 @@
+2019-03-26  Uroš Bizjak  <ubizjak@gmail.com>
+
+       PR target/89827
+       * gcc.target/i386/pr89827.c: New test.
+
 2019-03-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * g++.dg/abi/lambda-static-1.C: Handle Solaris as comdat group
diff --git a/gcc/testsuite/gcc.target/i386/pr89827.c b/gcc/testsuite/gcc.target/i386/pr89827.c
new file mode 100644 (file)
index 0000000..c6fb48b
--- /dev/null
@@ -0,0 +1,11 @@
+/* PR target/89827 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -msse2 -mstv -mno-stackrealign" } */
+
+unsigned long long a;
+
+void
+foo (void)
+{
+  a >>= (unsigned short) a;
+}