public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/114234] New: [14 Regression] verify_ssa failure with early-break vectorisation
@ 2024-03-05 10:46 rsandifo at gcc dot gnu.org
2024-03-05 13:19 ` [Bug tree-optimization/114234] " dcb314 at hotmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2024-03-05 10:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114234
Bug ID: 114234
Summary: [14 Regression] verify_ssa failure with early-break
vectorisation
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: rsandifo at gcc dot gnu.org
Target Milestone: ---
The following test ICEs with -Ofast on aarch64:
void bar();
float
foo (float x)
{
float a = 1;
float b = x;
long z = 200;
for (;;)
{
float c = b - 1.0f;
a *= c;
z -= 1;
if (z == 0)
{
bar ();
break;
}
if (b <= 3.0f)
break;
b = c;
}
return a * b;
}
(reduced from wrf). The ICE is:
foo.c:3:1: error: definition in block 15 does not dominate use in block 10
3 | foo (float x)
| ^~~
for SSA_NAME: stmp_a_9.10_103 in statement:
a_47 = PHI <stmp_a_9.10_103(10), stmp_a_9.10_103(15)>
PHI argument
stmp_a_9.10_103
for PHI node
a_47 = PHI <stmp_a_9.10_103(10), stmp_a_9.10_103(15)>
during GIMPLE pass: vect
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/114234] [14 Regression] verify_ssa failure with early-break vectorisation
2024-03-05 10:46 [Bug tree-optimization/114234] New: [14 Regression] verify_ssa failure with early-break vectorisation rsandifo at gcc dot gnu.org
@ 2024-03-05 13:19 ` dcb314 at hotmail dot com
2024-03-05 13:20 ` sjames at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: dcb314 at hotmail dot com @ 2024-03-05 13:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114234
David Binderman <dcb314 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dcb314 at hotmail dot com
--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
For this C code:
int ip4_getbit_a, ip4_getbit_pos, ip4_clrbit_pos;
void ip4_clrbit(int *a) { *a &= ip4_clrbit_pos; }
typedef struct {
char pxlen;
int prefix
} net_addr_ip4;
void fib_get_chain();
int trie_match_longest_ip4();
int trie_match_next_longest_ip4(net_addr_ip4 *n) {
int __trans_tmp_1;
while (n->pxlen) {
n->pxlen--;
ip4_clrbit(&n->prefix);
__trans_tmp_1 = ip4_getbit_a >> ip4_getbit_pos;
if (__trans_tmp_1)
return 1;
}
return 0;
}
void net_roa_check_ip4_trie_tab() {
net_addr_ip4 px0;
for (int _n = trie_match_longest_ip4(&px0); _n;
_n = trie_match_next_longest_ip4(&px0))
fib_get_chain();
}
on x86_64, does this:
$ ../results/bin/gcc -c -O3 -march=znver3 -w ~/cvise/bug1021.c
/home/dcb38/cvise/bug1021.c: In function ‘net_roa_check_ip4_trie_tab’:
/home/dcb38/cvise/bug1021.c:20:6: error: definition in block 19 does not
dominate use in block 14
20 | void net_roa_check_ip4_trie_tab() {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
for SSA_NAME: _117 in statement:
px0__lsm.22_47 = PHI <_117(14), _117(19)>
PHI argument
_117
for PHI node
px0__lsm.22_47 = PHI <_117(14), _117(19)>
during GIMPLE pass: vect
/home/dcb38/cvise/bug1021.c:20:6: internal compiler error: verify_ssa failed
The bug first seems to occur sometime between g:1e74ce8983fd4926
and g:71244316cf714725, which is 42 commits.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/114234] [14 Regression] verify_ssa failure with early-break vectorisation
2024-03-05 10:46 [Bug tree-optimization/114234] New: [14 Regression] verify_ssa failure with early-break vectorisation rsandifo at gcc dot gnu.org
2024-03-05 13:19 ` [Bug tree-optimization/114234] " dcb314 at hotmail dot com
@ 2024-03-05 13:20 ` sjames at gcc dot gnu.org
2024-03-05 14:23 ` tnfchris at gcc dot gnu.org
2024-03-06 12:06 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-03-05 13:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114234
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sjames at gcc dot gnu.org,
| |tnfchris at gcc dot gnu.org
--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
That second one is probably worth its own PR.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/114234] [14 Regression] verify_ssa failure with early-break vectorisation
2024-03-05 10:46 [Bug tree-optimization/114234] New: [14 Regression] verify_ssa failure with early-break vectorisation rsandifo at gcc dot gnu.org
2024-03-05 13:19 ` [Bug tree-optimization/114234] " dcb314 at hotmail dot com
2024-03-05 13:20 ` sjames at gcc dot gnu.org
@ 2024-03-05 14:23 ` tnfchris at gcc dot gnu.org
2024-03-06 12:06 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2024-03-05 14:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114234
Tamar Christina <tnfchris at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-03-05
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #3 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
started with
commit g:324d2907c86f05e40dc52d226940308f53a956c2
Author: Richard Biener <rguenther@suse.de>
Date: Mon Mar 4 09:46:13 2024 +0100
tree-optimization/114192 - scalar reduction kept live with early break vect
The following fixes a missing replacement of the reduction value
used in the epilog, causing the scalar reduction to be kept live
across the early break exit path.
PR tree-optimization/114192
* tree-vect-loop.cc (vect_create_epilog_for_reduction): Use the
appropriate def for the live out stmt in case of an alternate
exit.
the reduction seems to propagate out a single value for both exits:
# a_39 = PHI <stmp_a_9.10_95(10), stmp_a_9.10_95(15)>
but since the PHI nodes carry their reduction values in the exits we have
different reduction statements, so using the same reduction value for all exit
is wrong.
should be
# a_39 = PHI <stmp_a_9.10_89(10), stmp_a_9.10_95(15)>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/114234] [14 Regression] verify_ssa failure with early-break vectorisation
2024-03-05 10:46 [Bug tree-optimization/114234] New: [14 Regression] verify_ssa failure with early-break vectorisation rsandifo at gcc dot gnu.org
` (2 preceding siblings ...)
2024-03-05 14:23 ` tnfchris at gcc dot gnu.org
@ 2024-03-06 12:06 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-03-06 12:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114234
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
Target Milestone|--- |14.0
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Verified the PR114239 fix fixes this as well, dup.
*** This bug has been marked as a duplicate of bug 114239 ***
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-06 12:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-05 10:46 [Bug tree-optimization/114234] New: [14 Regression] verify_ssa failure with early-break vectorisation rsandifo at gcc dot gnu.org
2024-03-05 13:19 ` [Bug tree-optimization/114234] " dcb314 at hotmail dot com
2024-03-05 13:20 ` sjames at gcc dot gnu.org
2024-03-05 14:23 ` tnfchris at gcc dot gnu.org
2024-03-06 12:06 ` 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).