diff options
author | Jakub Jelinek <jakub@redhat.com> | 2015-04-09 09:28:54 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2015-04-09 09:28:54 +0200 |
commit | da0b9df9a8ece8d062b4fed47e0d67d007c8696a (patch) | |
tree | f008a45f68e2dd2b2910f4360d58792d8cae974d | |
parent | 9a165842d199b281674e5c660264bcf334c9bbd0 (diff) | |
download | gcc-da0b9df9a8ece8d062b4fed47e0d67d007c8696a.zip gcc-da0b9df9a8ece8d062b4fed47e0d67d007c8696a.tar.gz gcc-da0b9df9a8ece8d062b4fed47e0d67d007c8696a.tar.bz2 |
re PR rtl-optimization/65693 (ICE in assign_by_spills, at lra-assigns.c:1419)
PR target/65693
* config/i386/i386.md (*udivmod<mode>4_pow2): Allow
any pow2 integer in between 2 and 0x80000000U inclusive.
* gcc.target/i386/pr65693.c: New test.
From-SVN: r221942
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr65693.c | 13 |
4 files changed, 25 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e246510..7a2a9f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-04-09 Jakub Jelinek <jakub@redhat.com> + + PR target/65693 + * config/i386/i386.md (*udivmod<mode>4_pow2): Allow + any pow2 integer in between 2 and 0x80000000U inclusive. + 2015-04-08 Segher Boessenkool <segher@kernel.crashing.org> PR rtl-optimization/65693 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index cf63afd..e1c82fe 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -7340,7 +7340,7 @@ (set (match_operand:SWI48 1 "register_operand" "=r") (umod:SWI48 (match_dup 2) (match_dup 3))) (clobber (reg:CC FLAGS_REG))] - "UINTVAL (operands[3]) - 2 < <MODE_SIZE> * BITS_PER_UNIT + "IN_RANGE (INTVAL (operands[3]), 2, HOST_WIDE_INT_UC (0x80000000)) && (UINTVAL (operands[3]) & (UINTVAL (operands[3]) - 1)) == 0" "#" "&& 1" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ba6f841..667d42e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-04-09 Jakub Jelinek <jakub@redhat.com> + + PR target/65693 + * gcc.target/i386/pr65693.c: New test. + 2015-04-08 Ilya Enkovich <ilya.enkovich@intel.com> * gcc.dg/lto/chkp-static-bounds_0.c: New. diff --git a/gcc/testsuite/gcc.target/i386/pr65693.c b/gcc/testsuite/gcc.target/i386/pr65693.c new file mode 100644 index 0000000..bc380e4 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr65693.c @@ -0,0 +1,13 @@ +/* PR target/65693 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int a; + +void +foo (int (*fn) (int, int, int), unsigned int b) +{ + unsigned long *c = (unsigned long *) __builtin_alloca (b); + a = *c; + register int d asm ("edx") = fn (0, 0, d); +} |