From: Uros Bizjak Date: Tue, 26 Mar 2019 18:59:14 +0000 (+0100) Subject: re PR target/89827 (ICE: in convert_op, at config/i386/i386.c:2098 with -Os -maes) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a48d7fa69843ab586f553a3d7d8a3546cc617692;p=gcc.git re PR target/89827 (ICE: in convert_op, at config/i386/i386.c:2098 with -Os -maes) 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 48e4c86943f..c83f88a9493 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-26 Uroš Bizjak + + 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 * tree-inline.c (remap_gimple_stmt): Cache gimple_block. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index b5f20f1597e..3ea545732df 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 16bfddf5acc..2048487d876 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-26 Uroš Bizjak + + PR target/89827 + * gcc.target/i386/pr89827.c: New test. + 2019-03-26 Rainer Orth * 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 index 00000000000..c6fb48b54b9 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89827.c @@ -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; +}