public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/94420] New: ICE error: insn does not satisfy its constraints
@ 2020-03-31 5:45 marxin at gcc dot gnu.org
2020-03-31 11:08 ` [Bug target/94420] [8/9/10 Regression] " jakub at gcc dot gnu.org
` (15 more replies)
0 siblings, 16 replies; 17+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-31 5:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
Bug ID: 94420
Summary: ICE error: insn does not satisfy its constraints
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: krebbel at gcc dot gnu.org, segher at gcc dot gnu.org
Target Milestone: ---
Host: powerpc64-linux-gnu
Target: powerpc64-linux-gnu
It's reduced from moonjit bug:
https://github.com/moonjit/moonjit/issues/74
$ cat /tmp/moonjit.i
register long int *a __asm__("r2");
long int b;
void fn1() {
long *p = &b;
for (;;)
*p++ = (long int)a;
}
$ ./xgcc -B. /tmp/moonjit.i -c
$ ./xgcc -B. /tmp/moonjit.i -c -O2
/tmp/moonjit.i: In function ‘fn1’:
/tmp/moonjit.i:8:1: error: insn does not satisfy its constraints:
8 | }
| ^
(insn 7 5 8 2 (set (reg/f:DI 121)
(unspec:DI [
(symbol_ref:DI ("*.LANCHOR0") [flags 0x182])
(reg/f:DI 118 [ a.2_2 ])
] UNSPEC_TOCREL)) 731 {*tocrefdi}
(expr_list:REG_EQUAL (symbol_ref:DI ("*.LANCHOR0") [flags 0x182])
(nil)))
during RTL pass: combine
/tmp/moonjit.i:8:1: internal compiler error: in extract_constrain_insn_cached,
at recog.c:2207
0x10f19513 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc/rtl-error.c:108
0x10f195a7 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc/rtl-error.c:119
0x10ea179f extract_constrain_insn_cached(rtx_insn*)
../../gcc/recog.c:2207
0x11b779b7 get_attr_prefixed(rtx_insn*)
../../gcc/config/rs6000/rs6000.md:647
0x116c09df rs6000_insn_cost
../../gcc/config/rs6000/rs6000.c:21141
0x10f30097 insn_cost(rtx_insn*, bool)
../../gcc/rtlanal.c:5440
0x11ef525b combine_instructions
../../gcc/combine.c:1236
0x11f2b06f rest_of_handle_combine
../../gcc/combine.c:15059
0x11f2b1e3 execute
../../gcc/combine.c:15104
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [8/9/10 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
@ 2020-03-31 11:08 ` jakub at gcc dot gnu.org
2020-03-31 13:53 ` segher at gcc dot gnu.org
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-31 11:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-03-31
Ever confirmed|0 |1
CC| |jakub at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Summary|ICE error: insn does not |[8/9/10 Regression] ICE
|satisfy its constraints |error: insn does not
| |satisfy its constraints
Target Milestone|--- |8.5
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
With additional -fno-common it is quite old regression.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [8/9/10 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
2020-03-31 11:08 ` [Bug target/94420] [8/9/10 Regression] " jakub at gcc dot gnu.org
@ 2020-03-31 13:53 ` segher at gcc dot gnu.org
2020-03-31 14:07 ` jakub at gcc dot gnu.org
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: segher at gcc dot gnu.org @ 2020-03-31 13:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Reserving a register that already *is* reserved (by the ABI) is undefined,
of course.
But we shouldn't ICE.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [8/9/10 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
2020-03-31 11:08 ` [Bug target/94420] [8/9/10 Regression] " jakub at gcc dot gnu.org
2020-03-31 13:53 ` segher at gcc dot gnu.org
@ 2020-03-31 14:07 ` jakub at gcc dot gnu.org
2020-03-31 14:35 ` segher at gcc dot gnu.org
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-31 14:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'm not sure about the invalid, of course if one uses a global register var for
a fixed reg and stores something into it, then it is clearly UB, but this case
is ont about changing it, just inspecting, and I believe users use both global
and local register vars for various fixed regs quite often, whether it is a
stack pointer, hard frame pointer, _GLOBAL_OFFSET_TABLE_ etc.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [8/9/10 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2020-03-31 14:07 ` jakub at gcc dot gnu.org
@ 2020-03-31 14:35 ` segher at gcc dot gnu.org
2020-03-31 14:36 ` segher at gcc dot gnu.org
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: segher at gcc dot gnu.org @ 2020-03-31 14:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
--- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> ---
cprop1 has done
LOCAL COPY-PROP: Replacing reg 2 in insn 7 with reg 118
which is wrong: the insn isn't valid after that. But there is nothing
that expresses that, the "R" constraint "just" becomes unsatisfiable.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [8/9/10 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
` (3 preceding siblings ...)
2020-03-31 14:35 ` segher at gcc dot gnu.org
@ 2020-03-31 14:36 ` segher at gcc dot gnu.org
2020-03-31 14:38 ` jakub at gcc dot gnu.org
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: segher at gcc dot gnu.org @ 2020-03-31 14:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
--- Comment #5 from Segher Boessenkool <segher at gcc dot gnu.org> ---
It is undefined behaviour to access such a register in any way -- sure,
you *can* inspect it, there just is no guarantee at all what value you
will get.
It still is a useful thing to do in debug code and the like, of course.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [8/9/10 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
` (4 preceding siblings ...)
2020-03-31 14:36 ` segher at gcc dot gnu.org
@ 2020-03-31 14:38 ` jakub at gcc dot gnu.org
2020-03-31 14:45 ` segher at gcc dot gnu.org
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-31 14:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So shouldn't predicate on that operand verify the same thing as the constraint
does (or insn condition)?
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [8/9/10 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
` (5 preceding siblings ...)
2020-03-31 14:38 ` jakub at gcc dot gnu.org
@ 2020-03-31 14:45 ` segher at gcc dot gnu.org
2020-03-31 14:46 ` segher at gcc dot gnu.org
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: segher at gcc dot gnu.org @ 2020-03-31 14:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-invalid-code |ice-on-valid-code
--- Comment #7 from Segher Boessenkool <segher at gcc dot gnu.org> ---
But okay, let's call it valid code, it doesn't actually *do* anything with
the undefined value in this example :-)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [8/9/10 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
` (6 preceding siblings ...)
2020-03-31 14:45 ` segher at gcc dot gnu.org
@ 2020-03-31 14:46 ` segher at gcc dot gnu.org
2020-03-31 14:48 ` segher at gcc dot gnu.org
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: segher at gcc dot gnu.org @ 2020-03-31 14:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |segher at gcc dot gnu.org
--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> ---
I put it in the insn condition, testing it now.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [8/9/10 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
` (7 preceding siblings ...)
2020-03-31 14:46 ` segher at gcc dot gnu.org
@ 2020-03-31 14:48 ` segher at gcc dot gnu.org
2020-04-01 8:59 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: segher at gcc dot gnu.org @ 2020-03-31 14:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
--- Comment #9 from Segher Boessenkool <segher at gcc dot gnu.org> ---
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index dcccb03..11ab745 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -10311,7 +10311,8 @@ (define_insn "*largetoc_low_aix<mode>"
(define_insn_and_split "*tocref<mode>"
[(set (match_operand:P 0 "gpc_reg_operand" "=b")
(match_operand:P 1 "small_toc_ref" "R"))]
- "TARGET_TOC"
+ "TARGET_TOC
+ && legitimate_constant_pool_address_p (operands[1], QImode, false)"
"la %0,%a1"
"&& TARGET_CMODEL != CMODEL_SMALL && reload_completed"
[(set (match_dup 0) (high:P (match_dup 1)))
This works on the testcase fine; regression testing now.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [8/9/10 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
` (8 preceding siblings ...)
2020-03-31 14:48 ` segher at gcc dot gnu.org
@ 2020-04-01 8:59 ` rguenth at gcc dot gnu.org
2020-04-01 17:01 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-01 8:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [8/9/10 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
` (9 preceding siblings ...)
2020-04-01 8:59 ` rguenth at gcc dot gnu.org
@ 2020-04-01 17:01 ` cvs-commit at gcc dot gnu.org
2020-04-18 17:00 ` law at redhat dot com
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-01 17:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Segher Boessenkool <segher@gcc.gnu.org>:
https://gcc.gnu.org/g:032f2366a4cd57f781f2093d977b9cf9600c83b8
commit r10-7497-g032f2366a4cd57f781f2093d977b9cf9600c83b8
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date: Wed Apr 1 16:51:04 2020 +0000
rs6000: Make code questionably using r2 not ICE (PR94420)
The example code in the PR uses r2 (the TOC register) directly. In the
RTL generated for that, r2 is copied to some pseudo, and then cprop
propagates that into a "*tocref<mode>" insn, because nothing is
preventing it from doing that.
So, put the same condition in the insn condition for this as we will
later encounter in the constraint anyway, fixing this.
2020-04-01 Segher Boessenkool <segher@kernel.crashing.org>
PR target/94420
* config/rs6000/rs6000.md (*tocref<mode> for P): Add insn condition
on operands[1].
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [8/9/10 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
` (10 preceding siblings ...)
2020-04-01 17:01 ` cvs-commit at gcc dot gnu.org
@ 2020-04-18 17:00 ` law at redhat dot com
2020-04-18 21:43 ` [Bug target/94420] [8/9 " segher at gcc dot gnu.org
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: law at redhat dot com @ 2020-04-18 17:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at redhat dot com
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #11 from Jeffrey A. Law <law at redhat dot com> ---
Commit referenced by c#10 fixed this problem.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [8/9 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
` (11 preceding siblings ...)
2020-04-18 17:00 ` law at redhat dot com
@ 2020-04-18 21:43 ` segher at gcc dot gnu.org
2021-05-14 9:53 ` [Bug target/94420] [9 " jakub at gcc dot gnu.org
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: segher at gcc dot gnu.org @ 2020-04-18 21:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[8/9/10 Regression] ICE |[8/9 Regression] ICE error:
|error: insn does not |insn does not satisfy its
|satisfy its constraints |constraints
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #12 from Segher Boessenkool <segher at gcc dot gnu.org> ---
And backports haven't been done yet.
Don't close bugs like this, just edit the title :-)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [9 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
` (12 preceding siblings ...)
2020-04-18 21:43 ` [Bug target/94420] [8/9 " segher at gcc dot gnu.org
@ 2021-05-14 9:53 ` jakub at gcc dot gnu.org
2021-06-01 8:17 ` rguenth at gcc dot gnu.org
2022-05-27 8:50 ` rguenth at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14 9:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|8.5 |9.4
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [9 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
` (13 preceding siblings ...)
2021-05-14 9:53 ` [Bug target/94420] [9 " jakub at gcc dot gnu.org
@ 2021-06-01 8:17 ` rguenth at gcc dot gnu.org
2022-05-27 8:50 ` rguenth at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01 8:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.4 |9.5
--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug target/94420] [9 Regression] ICE error: insn does not satisfy its constraints
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
` (14 preceding siblings ...)
2021-06-01 8:17 ` rguenth at gcc dot gnu.org
@ 2022-05-27 8:50 ` rguenth at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 8:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94420
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|9.5 |10.0
Status|REOPENED |RESOLVED
--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in GCC 10.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2022-05-27 8:50 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 5:45 [Bug target/94420] New: ICE error: insn does not satisfy its constraints marxin at gcc dot gnu.org
2020-03-31 11:08 ` [Bug target/94420] [8/9/10 Regression] " jakub at gcc dot gnu.org
2020-03-31 13:53 ` segher at gcc dot gnu.org
2020-03-31 14:07 ` jakub at gcc dot gnu.org
2020-03-31 14:35 ` segher at gcc dot gnu.org
2020-03-31 14:36 ` segher at gcc dot gnu.org
2020-03-31 14:38 ` jakub at gcc dot gnu.org
2020-03-31 14:45 ` segher at gcc dot gnu.org
2020-03-31 14:46 ` segher at gcc dot gnu.org
2020-03-31 14:48 ` segher at gcc dot gnu.org
2020-04-01 8:59 ` rguenth at gcc dot gnu.org
2020-04-01 17:01 ` cvs-commit at gcc dot gnu.org
2020-04-18 17:00 ` law at redhat dot com
2020-04-18 21:43 ` [Bug target/94420] [8/9 " segher at gcc dot gnu.org
2021-05-14 9:53 ` [Bug target/94420] [9 " jakub at gcc dot gnu.org
2021-06-01 8:17 ` rguenth at gcc dot gnu.org
2022-05-27 8:50 ` rguenth 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).