* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
@ 2023-06-21 4:59 ` sjames at gcc dot gnu.org
2023-06-21 5:00 ` pinskia at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-06-21 4:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
--- Comment #1 from Sam James <sjames at gcc dot gnu.org> ---
g++ -O3 -c ... is enough to repro
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
2023-06-21 4:59 ` [Bug tree-optimization/110332] " sjames at gcc dot gnu.org
@ 2023-06-21 5:00 ` pinskia at gcc dot gnu.org
2023-06-21 5:07 ` pinskia at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-21 5:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu.org
Target Milestone|--- |14.0
Keywords| |ice-on-valid-code
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
2023-06-21 4:59 ` [Bug tree-optimization/110332] " sjames at gcc dot gnu.org
2023-06-21 5:00 ` pinskia at gcc dot gnu.org
@ 2023-06-21 5:07 ` pinskia at gcc dot gnu.org
2023-06-21 5:19 ` pinskia at gcc dot gnu.org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-21 5:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Either r14-1981 or r14-1951
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
` (2 preceding siblings ...)
2023-06-21 5:07 ` pinskia at gcc dot gnu.org
@ 2023-06-21 5:19 ` pinskia at gcc dot gnu.org
2023-06-21 8:36 ` rguenth at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-21 5:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reducing ...
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
` (3 preceding siblings ...)
2023-06-21 5:19 ` pinskia at gcc dot gnu.org
@ 2023-06-21 8:36 ` rguenth at gcc dot gnu.org
2023-06-21 16:57 ` sjames at gcc dot gnu.org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-21 8:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
possibly edge insertions with virtual operands confuse the machinery
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
` (4 preceding siblings ...)
2023-06-21 8:36 ` rguenth at gcc dot gnu.org
@ 2023-06-21 16:57 ` sjames at gcc dot gnu.org
2023-06-21 17:05 ` slyfox at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-06-21 16:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
--- Comment #5 from Sam James <sjames at gcc dot gnu.org> ---
Created attachment 55379
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55379&action=edit
reduced.ii
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
` (5 preceding siblings ...)
2023-06-21 16:57 ` sjames at gcc dot gnu.org
@ 2023-06-21 17:05 ` slyfox at gcc dot gnu.org
2023-06-21 17:11 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-06-21 17:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
Sergei Trofimovich <slyfox at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |slyfox at gcc dot gnu.org
--- Comment #6 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
I think I see the same ICE on llvm-12 and r14-2009-g864c6471bdc6cd:
cvise produced this thing:
// $ cat a.cpp.cpp
struct SlotIndex { int lie; };
SlotIndex si7, si8;
unsigned u9, u6;
bool b3, b4;
unsigned &value() {
return b4 ? u6 : u9;
}
void transferValues() {
unsigned RegIdx;
SlotIndex End;
RegIdx = value();
End = b3 ? si7 : si8;
}
$ g++ -O3 -c a.cpp.cpp -o a.o
during GIMPLE pass: phiprop
a.cpp.cpp: In function 'void transferValues()':
a.cpp.cpp:14:1: internal compiler error: Segmentation fault
14 | }
| ^
0x1d74824 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char
const*, __va_list_tag (*) [1], diagnostic_t)
???:0
0x1d74d97 internal_error(char const*, ...)
???:0
0xe9bfdf crash_signal(int)
???:0
0xa851da dominated_by_p(cdi_direction, basic_block_def const*, basic_block_def
const*)
???:0
0x102096b (anonymous namespace)::pass_phiprop::execute(function*)
???:0
$ g++ -v
Using built-in specs.
COLLECT_GCC=/<<NIX>>/gcc-14.0.0/bin/g++
COLLECT_LTO_WRAPPER=/<<NIX>>/gcc-14.0.0/libexec/gcc/x86_64-unknown-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with:
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 99999999 (experimental) (GCC)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
` (6 preceding siblings ...)
2023-06-21 17:05 ` slyfox at gcc dot gnu.org
@ 2023-06-21 17:11 ` pinskia at gcc dot gnu.org
2023-06-21 20:55 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-21 17:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-06-21
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced C testcase:
```
struct s { int lie; };
struct s si7, si8;
unsigned u9, u6;
_Bool b3, b4;
unsigned transferValues(struct s *End) {
unsigned RegIdx;
unsigned *t = b4 ? &u6 : &u9;
RegIdx = *t;
*End = *(b3 ? &si7 : &si8);
return RegIdx;
}
```
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
` (7 preceding siblings ...)
2023-06-21 17:11 ` pinskia at gcc dot gnu.org
@ 2023-06-21 20:55 ` pinskia at gcc dot gnu.org
2023-06-22 6:08 ` slyfox at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-21 20:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
Another one reduced C testcase, very similar to the previous one but slightly
more reduced:
```
_Bool a;
struct s { int t; } c, d;
unsigned e, f;
unsigned transferValues(struct s *End) {
unsigned RegIdx = *(a ? &e : &f);
*End = *(a ? &c : &d);
return RegIdx;
}
```
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
` (8 preceding siblings ...)
2023-06-21 20:55 ` pinskia at gcc dot gnu.org
@ 2023-06-22 6:08 ` slyfox at gcc dot gnu.org
2023-06-22 6:40 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-06-22 6:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
--- Comment #9 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> Either r14-1981 or r14-1951
Reverting r14-1981-g85107abeb71bbf restores llvm-12 build for me.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
` (9 preceding siblings ...)
2023-06-22 6:08 ` slyfox at gcc dot gnu.org
@ 2023-06-22 6:40 ` rguenth at gcc dot gnu.org
2023-06-22 8:14 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-22 6:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
` (10 preceding siblings ...)
2023-06-22 6:40 ` rguenth at gcc dot gnu.org
@ 2023-06-22 8:14 ` cvs-commit at gcc dot gnu.org
2023-06-22 8:14 ` rguenth at gcc dot gnu.org
2023-06-22 9:55 ` slyfox at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-22 8:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:2ac41866270e9fbab504bbda7a942a97abaa203a
commit r14-2031-g2ac41866270e9fbab504bbda7a942a97abaa203a
Author: Richard Biener <rguenther@suse.de>
Date: Thu Jun 22 09:04:01 2023 +0200
tree-optimization/110332 - fix ICE with phiprop
The following fixes an ICE that occurs when we visit an edge
inserted load from the code validating correctness for inserting
an aggregate copy there. We can simply skip those loads here.
PR tree-optimization/110332
* tree-ssa-phiprop.cc (propagate_with_phi): Always
check aliasing with edge inserted loads.
* g++.dg/torture/pr110332.C: New testcase.
* gcc.dg/torture/pr110332-1.c: Likewise.
* gcc.dg/torture/pr110332-2.c: Likewise.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
` (11 preceding siblings ...)
2023-06-22 8:14 ` cvs-commit at gcc dot gnu.org
@ 2023-06-22 8:14 ` rguenth at gcc dot gnu.org
2023-06-22 9:55 ` slyfox at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-22 8:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/110332] [14 regression] ICE in dominated_by_p when building LLVM with -O3
2023-06-21 4:57 [Bug tree-optimization/110332] New: [14 regression] ICE in dominated_by_p when building LLVM with -O3 sjames at gcc dot gnu.org
` (12 preceding siblings ...)
2023-06-22 8:14 ` rguenth at gcc dot gnu.org
@ 2023-06-22 9:55 ` slyfox at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-06-22 9:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110332
--- Comment #13 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
The fix fixes llvm-12 build for me. Thank you!
^ permalink raw reply [flat|nested] 15+ messages in thread