* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
@ 2014-03-25 16:39 ` doko at gcc dot gnu.org
2014-03-25 18:18 ` ramana at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: doko at gcc dot gnu.org @ 2014-03-25 16:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
--- Comment #1 from Matthias Klose <doko at gcc dot gnu.org> ---
seen with every package using this boost header
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
2014-03-25 16:39 ` [Bug target/60657] " doko at gcc dot gnu.org
@ 2014-03-25 18:18 ` ramana at gcc dot gnu.org
2014-03-26 12:52 ` rguenth at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-03-25 18:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-03-25
CC| |ramana at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
2014-03-25 16:39 ` [Bug target/60657] " doko at gcc dot gnu.org
2014-03-25 18:18 ` ramana at gcc dot gnu.org
@ 2014-03-26 12:52 ` rguenth at gcc dot gnu.org
2014-03-26 20:45 ` jakub at gcc dot gnu.org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-26 12:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.9.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
` (2 preceding siblings ...)
2014-03-26 12:52 ` rguenth at gcc dot gnu.org
@ 2014-03-26 20:45 ` jakub at gcc dot gnu.org
2014-03-26 20:46 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-26 20:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase -O2 -march=armv7-a:
void foo (void);
void
bar (int x, int y)
{
y = 9999;
if (x & (1 << y))
foo ();
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
` (3 preceding siblings ...)
2014-03-26 20:45 ` jakub at gcc dot gnu.org
@ 2014-03-26 20:46 ` jakub at gcc dot gnu.org
2014-03-27 8:01 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-26 20:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note the code isn't invalid, just has undefined behavior.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
` (4 preceding siblings ...)
2014-03-26 20:46 ` jakub at gcc dot gnu.org
@ 2014-03-27 8:01 ` jakub at gcc dot gnu.org
2014-03-31 9:57 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-27 8:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This fixes this for me, based on:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABIDBHE.html
If gas accepts some other value beyond those, the conditions can be tweaked of
course, or it could be solved through more tight predicates and/or more
correct/tight constraints (don't see how 0-32 or any power of 2 applies here,
plus the ICE is that const_int_operand + no specific condition allowed combine
to match garbage insn and once you match it with a wrong number, when the
operand doesn't have a register possibility, there is no way to reload it).
Can somebody please test this (together with the testcase, dunno if
-march=armv7-a is tested often enough that the testcase could be just added to
gcc.c-torture/compile/pr60657.c or if you really want to add the -march=armv7-a
option explicitly). I'd also think that it would be worthwhile to look at all
arm insns with const_int_operand and constraint that doesn't accept all
CONST_INT values and check if it shouldn't be tightened.
--- gcc/config/arm/arm.md.jj 2014-01-03 11:41:20.000000000 +0100
+++ gcc/config/arm/arm.md 2014-03-27 08:53:48.267277083 +0100
@@ -4581,7 +4581,9 @@ (define_insn "*extv_reg"
(sign_extract:SI (match_operand:SI 1 "s_register_operand" "r")
(match_operand:SI 2 "const_int_operand" "M")
(match_operand:SI 3 "const_int_operand" "M")))]
- "arm_arch_thumb2"
+ "arm_arch_thumb2
+ && IN_RANGE (INTVAL (operands[3]), 0, 31)
+ && IN_RANGE (INTVAL (operands[2]), 1, 32 - INTVAL (operands[3]))"
"sbfx%?\t%0, %1, %3, %2"
[(set_attr "length" "4")
(set_attr "predicable" "yes")
@@ -4594,7 +4596,9 @@ (define_insn "extzv_t2"
(zero_extract:SI (match_operand:SI 1 "s_register_operand" "r")
(match_operand:SI 2 "const_int_operand" "M")
(match_operand:SI 3 "const_int_operand" "M")))]
- "arm_arch_thumb2"
+ "arm_arch_thumb2
+ && IN_RANGE (INTVAL (operands[3]), 0, 31)
+ && IN_RANGE (INTVAL (operands[2]), 1, 32 - INTVAL (operands[3]))"
"ubfx%?\t%0, %1, %3, %2"
[(set_attr "length" "4")
(set_attr "predicable" "yes")
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
` (5 preceding siblings ...)
2014-03-27 8:01 ` jakub at gcc dot gnu.org
@ 2014-03-31 9:57 ` rguenth at gcc dot gnu.org
2014-04-01 19:43 ` law at redhat dot com
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-31 9:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
` (6 preceding siblings ...)
2014-03-31 9:57 ` rguenth at gcc dot gnu.org
@ 2014-04-01 19:43 ` law at redhat dot com
2014-04-02 18:29 ` law at redhat dot com
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: law at redhat dot com @ 2014-04-01 19:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at redhat dot com
--- Comment #6 from Jeffrey A. Law <law at redhat dot com> ---
There's a handful of these that need fixing in the ARM backend, some for the
'M' constraint others for 'I'.
Could you use satisfies_constraint_M and satisfies_constraint_I on the operand?
At least that way the constraint and the predicate are 100% checking the same
thing.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
` (7 preceding siblings ...)
2014-04-01 19:43 ` law at redhat dot com
@ 2014-04-02 18:29 ` law at redhat dot com
2014-04-03 3:55 ` law at redhat dot com
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: law at redhat dot com @ 2014-04-02 18:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
--- Comment #7 from Jeffrey A. Law <law at redhat dot com> ---
Actually, it occurs to me, why don't we fix the predicates. That seems like a
better solution than rejecting problematical constants in the insn's condition.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
` (8 preceding siblings ...)
2014-04-02 18:29 ` law at redhat dot com
@ 2014-04-03 3:55 ` law at redhat dot com
2014-04-04 13:13 ` law at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: law at redhat dot com @ 2014-04-03 3:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
--- Comment #8 from Jeffrey A. Law <law at redhat dot com> ---
Patch is spinning which introduced new predicates which only allow suitable
constants.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
` (9 preceding siblings ...)
2014-04-03 3:55 ` law at redhat dot com
@ 2014-04-04 13:13 ` law at gcc dot gnu.org
2014-04-04 13:14 ` law at redhat dot com
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: law at gcc dot gnu.org @ 2014-04-04 13:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
--- Comment #9 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Fri Apr 4 13:13:20 2014
New Revision: 209085
URL: http://gcc.gnu.org/viewcvs?rev=209085&root=gcc&view=rev
Log:
PR target/60657
* config/arm/predicates.md (const_int_I_operand): New predicate.
(const_int_M_operand): Similarly.
* config/arm/arm.md (insv_zero): Use const_int_M_operand instead of
const_int_operand.
(insv_t2, extv_reg, extzv_t2): Likewise.
(load_multiple_with_writeback): Similarly for const_int_I_operand.
(pop_multiple_with_writeback_and_return): Likewise.
(vfp_pop_multiple_with_writeback): Likewise
PR target/60657
* gcc.target/arm/pr60657.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/arm/pr60657.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arm/arm.md
trunk/gcc/config/arm/predicates.md
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
` (10 preceding siblings ...)
2014-04-04 13:13 ` law at gcc dot gnu.org
@ 2014-04-04 13:14 ` law at redhat dot com
2014-04-07 13:17 ` ramana at gcc dot gnu.org
2014-04-07 22:11 ` jakub at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: law at redhat dot com @ 2014-04-04 13:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from Jeffrey A. Law <law at redhat dot com> ---
Fixed on trunk.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
` (11 preceding siblings ...)
2014-04-04 13:14 ` law at redhat dot com
@ 2014-04-07 13:17 ` ramana at gcc dot gnu.org
2014-04-07 22:11 ` jakub at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-04-07 13:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
--- Comment #11 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Author: ramana
Date: Mon Apr 7 13:17:11 2014
New Revision: 209185
URL: http://gcc.gnu.org/viewcvs?rev=209185&root=gcc&view=rev
Log:
Fix testcase for PR target/60657
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/arm/pr60657.c
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints
2014-03-25 16:31 [Bug target/60657] New: [4.9 Regression] ICE: error: insn does not satisfy its constraints doko at gcc dot gnu.org
` (12 preceding siblings ...)
2014-04-07 13:17 ` ramana at gcc dot gnu.org
@ 2014-04-07 22:11 ` jakub at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-07 22:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
While the improved predicates make the first IN_RANGE tests unneeded, IMHO it
should still verify what the second IN_RANGE tests did, i.e. that operands[2]
is not 0 and at most 32 - third operand. I think the combiner just blindly
tries to match and simplify, all the verification is performed through trying
to recog the insn.
^ permalink raw reply [flat|nested] 15+ messages in thread