From: Uros Bizjak Date: Thu, 28 Mar 2019 19:15:58 +0000 (+0100) Subject: re PR target/89848 (ICE: in convert_op, at config/i386/i386.c:2099 with -O2 -msse2... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=198c27e98311d1d3561f154e75a9df23bff8bacf;p=gcc.git re PR target/89848 (ICE: in convert_op, at config/i386/i386.c:2099 with -O2 -msse2 -mtune=pentium3m) PR target/89848 * config/i386/i386.c (dimode_scalar_chain::make_vector_copies): Also process XEXP (src, 0) of a shift insn. testsuite/ChangeLog: PR target/89848 * gcc.target/i386/pr89848.c: New test. From-SVN: r270003 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 741639daa12..2ce421515af 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-28 Uroš Bizjak + + PR target/89848 + * config/i386/i386.c (dimode_scalar_chain::make_vector_copies): + Also process XEXP (src, 0) of a shift insn. + 2019-03-28 David Malcolm PR middle-end/89725 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index c695fcdc32f..6926085fdd2 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1901,7 +1901,10 @@ dimode_scalar_chain::make_vector_copies (unsigned regno) || GET_CODE (src) == LSHIFTRT) && !CONST_INT_P (XEXP (src, 1)) && reg_or_subregno (XEXP (src, 1)) == regno) - XEXP (src, 1) = vreg; + { + XEXP (src, 0) = replace_with_subreg (XEXP (src, 0), reg, reg); + XEXP (src, 1) = vreg; + } } else replace_with_subreg_in_insn (insn, reg, vreg); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0210cd72935..cf9ed5cda8f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-28 Uroš Bizjak + + PR target/89848 + * gcc.target/i386/pr89848.c: New test. + 2019-03-28 Marek Polacek PR c++/89836 - bool constant expression and explicit conversions. diff --git a/gcc/testsuite/gcc.target/i386/pr89848.c b/gcc/testsuite/gcc.target/i386/pr89848.c new file mode 100644 index 00000000000..eb67d0dd1e8 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89848.c @@ -0,0 +1,11 @@ +/* PR target/89848 */ +/* { dg-do compile { target ia32 } } */ +/* { dg-options "-O2 -msse2 -mtune=pentium3m" } */ + +long long +foo (long long x) +{ + x >>= 3; + x <<= x; + return x; +}