public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/50193] New: ARM: ICE on a | (b << negative-constant)
@ 2011-08-26 0:07 michael.hope at linaro dot org
2011-08-28 22:57 ` [Bug target/50193] " michael.hope at linaro dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: michael.hope at linaro dot org @ 2011-08-26 0:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50193
Bug #: 50193
Summary: ARM: ICE on a | (b << negative-constant)
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: michael.hope@linaro.org
trunk r178025, 4.6.1, and 4.5.3 all ICE with unsatisfied constraints on the
following code:
int foo(int a, int b)
{
return a | (b << -3);
}
shift.c: In function 'foo':
shift.c:3:5: warning: left shift count is negative [enabled by default]
shift.c:4:1: error: insn does not satisfy its constraints:
(insn 14 9 17 2 (set (reg/i:SI 0 r0)
(ior:SI (ashift:SI (reg:SI 1 r1 [ b ])
(const_int -3 [0xfffffffffffffffd]))
(reg:SI 0 r0 [ a ]))) shift.c:4 259 {*arith_shiftsi}
(expr_list:REG_DEAD (reg:SI 1 r1 [ b ])
(nil)))
shift.c:4:1: internal compiler error: in extract_constrain_insn_cached, at
recog.c:2030
This happens with -mcpu=cortex-a9 -mthumb. With -marm, GCC recognises that the
shift is unusual, loads it into a register, then uses this in the
register-shifted-register form of ORR. This form isn't available in Thumb-2.
The problem was originally seen in libtheora:lib/mathops.c when built with -O3
-funroll-loops when a shift by negative 8 is generated.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/50193] ARM: ICE on a | (b << negative-constant)
2011-08-26 0:07 [Bug target/50193] New: ARM: ICE on a | (b << negative-constant) michael.hope at linaro dot org
@ 2011-08-28 22:57 ` michael.hope at linaro dot org
2011-09-01 10:19 ` ams at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: michael.hope at linaro dot org @ 2011-08-28 22:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50193
--- Comment #1 from Michael Hope <michael.hope at linaro dot org> 2011-08-28 21:40:01 UTC ---
Also occurs when building LLVM trunk. See:
http://builds.linaro.org/toolchain/llvm-3.0~svn138625/logs/armv7l-natty-cbuild172-ursa1-cortexa9r1/llvm-build.txt
/scratch/cbuild/slave/slaves/ursa1/llvm-3.0~svn138625/llvm/llvm-3.0~/tools/clang/unittests/AST/APValueTest.cpp:
In member function 'virtual void
{anonymous}::APValue_Diagnostics_Test::TestBody()':
/scratch/cbuild/slave/slaves/ursa1/llvm-3.0~svn138625/llvm/llvm-3.0~/tools/clang/unittests/AST/APValueTest.cpp:77:1:
error: insn does not satisfy its constraints:
(insn 1267 1266 1269 72 (set (subreg:SI (reg:DI 1327) 0)
(ior:SI (ashift:SI (reg:SI 1330)
(const_int -16 [0xfffffffffffffff0]))
(subreg:SI (reg:DI 1327) 0)))
/scratch/cbuild/slave/slaves/ursa1/llvm-3.0~svn138625/llvm/llvm-3.0~/include/llvm/ADT/APInt.h:140
257 {*arith_shiftsi}
(nil))
/scratch/cbuild/slave/slaves/ursa1/llvm-3.0~svn138625/llvm/llvm-3.0~/tools/clang/unittests/AST/APValueTest.cpp:77:1:
internal compiler error: in extract_constrain_insn_cached, at recog.c:2028
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/50193] ARM: ICE on a | (b << negative-constant)
2011-08-26 0:07 [Bug target/50193] New: ARM: ICE on a | (b << negative-constant) michael.hope at linaro dot org
2011-08-28 22:57 ` [Bug target/50193] " michael.hope at linaro dot org
@ 2011-09-01 10:19 ` ams at gcc dot gnu.org
2011-10-10 11:40 ` ams at gcc dot gnu.org
2011-12-03 15:59 ` doko at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ams at gcc dot gnu.org @ 2011-09-01 10:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50193
Andrew Stubbs <ams at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011-09-01
CC| |ams at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |ams at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #2 from Andrew Stubbs <ams at gcc dot gnu.org> 2011-09-01 10:19:03 UTC ---
The problem appears to be that the predicate accepts any constant, without
checking the range.
I'll post a patch shortly.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/50193] ARM: ICE on a | (b << negative-constant)
2011-08-26 0:07 [Bug target/50193] New: ARM: ICE on a | (b << negative-constant) michael.hope at linaro dot org
2011-08-28 22:57 ` [Bug target/50193] " michael.hope at linaro dot org
2011-09-01 10:19 ` ams at gcc dot gnu.org
@ 2011-10-10 11:40 ` ams at gcc dot gnu.org
2011-12-03 15:59 ` doko at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ams at gcc dot gnu.org @ 2011-10-10 11:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50193
Andrew Stubbs <ams at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #3 from Andrew Stubbs <ams at gcc dot gnu.org> 2011-10-10 11:39:22 UTC ---
This has now been fixed. The patch was posted here:
http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00594.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/50193] ARM: ICE on a | (b << negative-constant)
2011-08-26 0:07 [Bug target/50193] New: ARM: ICE on a | (b << negative-constant) michael.hope at linaro dot org
` (2 preceding siblings ...)
2011-10-10 11:40 ` ams at gcc dot gnu.org
@ 2011-12-03 15:59 ` doko at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: doko at gcc dot gnu.org @ 2011-12-03 15:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50193
Matthias Klose <doko at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |konstantinos.margaritis at
| |linaro dot org
--- Comment #4 from Matthias Klose <doko at gcc dot gnu.org> 2011-12-03 15:58:45 UTC ---
*** Bug 50947 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-12-03 15:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-26 0:07 [Bug target/50193] New: ARM: ICE on a | (b << negative-constant) michael.hope at linaro dot org
2011-08-28 22:57 ` [Bug target/50193] " michael.hope at linaro dot org
2011-09-01 10:19 ` ams at gcc dot gnu.org
2011-10-10 11:40 ` ams at gcc dot gnu.org
2011-12-03 15:59 ` doko at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).