public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/104450] New: [12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f
@ 2022-02-08 20:21 zsojka at seznam dot cz
2022-02-08 21:07 ` [Bug tree-optimization/104450] " pinskia at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2022-02-08 20:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104450
Bug ID: 104450
Summary: [12 Regression] ICE: verify_flow_info failed: BB 2
cannot throw but has an EH edge with -O
-fnon-call-exceptions -fsanitize=thread -mavx512f
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 52379
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52379&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -fnon-call-exceptions -fsanitize=thread -mavx512f
testcase.c
testcase.c: In function 'foo':
testcase.c:8:1: error: BB 2 cannot throw but has an EH edge
8 | foo (void)
| ^~~
during GIMPLE pass: isel
testcase.c:8:1: internal compiler error: verify_flow_info failed
0xe7189e verify_flow_info()
/repo/gcc-trunk/gcc/cfghooks.cc:284
0x127adea execute_function_todo
/repo/gcc-trunk/gcc/passes.cc:2096
0x127b2fe execute_todo
/repo/gcc-trunk/gcc/passes.cc:2138
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-7089-20220208123931-g0103c2e4082-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-7089-20220208123931-g0103c2e4082-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220208 (experimental) (GCC)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/104450] [12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f
2022-02-08 20:21 [Bug middle-end/104450] New: [12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f zsojka at seznam dot cz
@ 2022-02-08 21:07 ` pinskia at gcc dot gnu.org
2022-02-08 21:14 ` pinskia at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-08 21:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104450
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Component|middle-end |tree-optimization
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/104450] [12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f
2022-02-08 20:21 [Bug middle-end/104450] New: [12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f zsojka at seznam dot cz
2022-02-08 21:07 ` [Bug tree-optimization/104450] " pinskia at gcc dot gnu.org
@ 2022-02-08 21:14 ` pinskia at gcc dot gnu.org
2022-02-09 0:28 ` [Bug tree-optimization/104450] [11/12 " pinskia at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-08 21:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104450
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-02-08
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is a testcase without -fsanitize=thread:
That is you just need -O1 -fnon-call-exceptions -mavx512f:
#define vectsize 64
typedef int __attribute__((__vector_size__ (vectsize))) V;
typedef float __attribute__((__vector_size__ (vectsize))) F;
F f;
V v;
struct g{~g();};
void
foo (void)
{
g t;
v += (V) (0 <= f);
}
----- CUT ----
We start out with (the comparison throws):
f.0_1 = f;
_6 = f.0_1 >= { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0 };
<bb 3> [local count: 1073741824]:
_2 = VEC_COND_EXPR <_6, { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }>;
v.1_3 = v;
And isel converts it into:
f.0_1 = f;
<bb 3> [local count: 1073741824]:
_2 = .VCOND (f.0_1, { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0 }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 111);
But now the comparison and VEC_COND_EXPR is just the builtin .VCOND which is
not marked to throw and in bb3 ....
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/104450] [11/12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f
2022-02-08 20:21 [Bug middle-end/104450] New: [12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f zsojka at seznam dot cz
2022-02-08 21:07 ` [Bug tree-optimization/104450] " pinskia at gcc dot gnu.org
2022-02-08 21:14 ` pinskia at gcc dot gnu.org
@ 2022-02-09 0:28 ` pinskia at gcc dot gnu.org
2022-02-09 7:41 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-09 0:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104450
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.0 |11.3
Summary|[12 Regression] ICE: |[11/12 Regression] ICE:
|verify_flow_info failed: BB |verify_flow_info failed: BB
|2 cannot throw but has an |2 cannot throw but has an
|EH edge with -O |EH edge with -O
|-fnon-call-exceptions |-fnon-call-exceptions
|-fsanitize=thread -mavx512f |-fsanitize=thread -mavx512f
Known to fail| |11.1.0, 11.2.0
Keywords| |needs-bisection
Known to work| |10.1.0, 9.1.0
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note GCC 10 and before did:
_5 = VEC_COND_EXPR <f.0_1 >= { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }>;
Which is marked as maybe throwing.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/104450] [11/12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f
2022-02-08 20:21 [Bug middle-end/104450] New: [12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f zsojka at seznam dot cz
` (2 preceding siblings ...)
2022-02-09 0:28 ` [Bug tree-optimization/104450] [11/12 " pinskia at gcc dot gnu.org
@ 2022-02-09 7:41 ` rguenth at gcc dot gnu.org
2022-02-09 9:07 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-09 7:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104450
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, OK - that needs some thoughts. I think the easiest woudl be to avoid
"forwarding" the comparison if it has EH.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/104450] [11/12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f
2022-02-08 20:21 [Bug middle-end/104450] New: [12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f zsojka at seznam dot cz
` (3 preceding siblings ...)
2022-02-09 7:41 ` rguenth at gcc dot gnu.org
@ 2022-02-09 9:07 ` cvs-commit at gcc dot gnu.org
2022-03-28 11:06 ` [Bug tree-optimization/104450] [11 " marxin at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-09 9:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104450
--- Comment #4 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:871afdc512be0510cbd4fa0928e5a1bd0681766e
commit r12-7123-g871afdc512be0510cbd4fa0928e5a1bd0681766e
Author: Richard Biener <rguenther@suse.de>
Date: Wed Feb 9 09:11:28 2022 +0100
middle-end/104450 - ISEL and non-call EH
The following avoids merging a vector compare with EH with a
VEC_COND_EXPR. We should be able to do fallback expansion and if
we really are for the optimization we need quite some shuffling
to arrange for the proper EH redirection in all cases, IMHO not
worth it.
2022-02-09 Richard Biener <rguenther@suse.de>
PR middle-end/104450
* gimple-isel.cc: Pass cfun around.
(+gimple_expand_vec_cond_expr): Do not combine a throwing
comparison with the select.
* g++.dg/torture/pr104450.C: New testcase.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/104450] [11 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f
2022-02-08 20:21 [Bug middle-end/104450] New: [12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f zsojka at seznam dot cz
` (4 preceding siblings ...)
2022-02-09 9:07 ` cvs-commit at gcc dot gnu.org
@ 2022-03-28 11:06 ` marxin at gcc dot gnu.org
2022-04-21 7:51 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-28 11:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104450
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-bisection |
CC| |marxin at gcc dot gnu.org
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Btw. started with r11-1645-ga8d8caca0cbfde03.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/104450] [11 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f
2022-02-08 20:21 [Bug middle-end/104450] New: [12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f zsojka at seznam dot cz
` (5 preceding siblings ...)
2022-03-28 11:06 ` [Bug tree-optimization/104450] [11 " marxin at gcc dot gnu.org
@ 2022-04-21 7:51 ` rguenth at gcc dot gnu.org
2023-04-17 10:44 ` cvs-commit at gcc dot gnu.org
2023-04-17 10:46 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-21 7:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104450
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.3 |11.4
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.3 is being released, retargeting bugs to GCC 11.4.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/104450] [11 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f
2022-02-08 20:21 [Bug middle-end/104450] New: [12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f zsojka at seznam dot cz
` (6 preceding siblings ...)
2022-04-21 7:51 ` rguenth at gcc dot gnu.org
@ 2023-04-17 10:44 ` cvs-commit at gcc dot gnu.org
2023-04-17 10:46 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-17 10:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104450
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:9dcc5d68cd935c9ff0ef023fe8b3bd7ab67d0687
commit r11-10630-g9dcc5d68cd935c9ff0ef023fe8b3bd7ab67d0687
Author: Richard Biener <rguenther@suse.de>
Date: Wed Feb 9 09:11:28 2022 +0100
middle-end/104450 - ISEL and non-call EH
The following avoids merging a vector compare with EH with a
VEC_COND_EXPR. We should be able to do fallback expansion and if
we really are for the optimization we need quite some shuffling
to arrange for the proper EH redirection in all cases, IMHO not
worth it.
2022-02-09 Richard Biener <rguenther@suse.de>
PR middle-end/104450
* gimple-isel.cc: Pass cfun around.
(+gimple_expand_vec_cond_expr): Do not combine a throwing
comparison with the select.
* g++.dg/torture/pr104450.C: New testcase.
(cherry picked from commit 871afdc512be0510cbd4fa0928e5a1bd0681766e)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/104450] [11 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f
2022-02-08 20:21 [Bug middle-end/104450] New: [12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f zsojka at seznam dot cz
` (7 preceding siblings ...)
2023-04-17 10:44 ` cvs-commit at gcc dot gnu.org
@ 2023-04-17 10:46 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-04-17 10:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104450
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |11.3.0
Known to work| |11.3.1
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-04-17 10:46 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 20:21 [Bug middle-end/104450] New: [12 Regression] ICE: verify_flow_info failed: BB 2 cannot throw but has an EH edge with -O -fnon-call-exceptions -fsanitize=thread -mavx512f zsojka at seznam dot cz
2022-02-08 21:07 ` [Bug tree-optimization/104450] " pinskia at gcc dot gnu.org
2022-02-08 21:14 ` pinskia at gcc dot gnu.org
2022-02-09 0:28 ` [Bug tree-optimization/104450] [11/12 " pinskia at gcc dot gnu.org
2022-02-09 7:41 ` rguenth at gcc dot gnu.org
2022-02-09 9:07 ` cvs-commit at gcc dot gnu.org
2022-03-28 11:06 ` [Bug tree-optimization/104450] [11 " marxin at gcc dot gnu.org
2022-04-21 7:51 ` rguenth at gcc dot gnu.org
2023-04-17 10:44 ` cvs-commit at gcc dot gnu.org
2023-04-17 10:46 ` 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).