public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/108750] New: Loop unswitching fails for poly_int conditions
@ 2023-02-10 10:23 rsandifo at gcc dot gnu.org
2023-02-10 13:57 ` [Bug tree-optimization/108750] " rguenth at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2023-02-10 10:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108750
Bug ID: 108750
Summary: Loop unswitching fails for poly_int conditions
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: rsandifo at gcc dot gnu.org
Target Milestone: ---
Loop unswitching fails to handle:
#include <arm_sve.h>
void foo(int *x, int *y, int z) {
for (int i = 0; i < 100; ++i)
if (svcntb() >= 4)
x[i] = y[i] + 1;
else
y[i] += 1;
}
(although it does of course handle the result of replacing svcntb() with a
variable). From a quick check, simply removing:
/* At least the LHS needs to be symbolic. */
if (TREE_CODE (gimple_cond_lhs (stmt)) != SSA_NAME)
return;
seems to fix it, but I've no idea what the fallout of that would be.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug tree-optimization/108750] Loop unswitching fails for poly_int conditions
2023-02-10 10:23 [Bug tree-optimization/108750] New: Loop unswitching fails for poly_int conditions rsandifo at gcc dot gnu.org
@ 2023-02-10 13:57 ` rguenth at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-10 13:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108750
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2023-02-10
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
probably needs some other guards in strathegic places, other than that there's
no reason it shouldn't work ...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-10 13:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-10 10:23 [Bug tree-optimization/108750] New: Loop unswitching fails for poly_int conditions rsandifo at gcc dot gnu.org
2023-02-10 13:57 ` [Bug tree-optimization/108750] " 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).