[Bug tree-optimization/113434] [13/14 Regression] VRP misses conditional in loop is always false sometimes

2024-01-17 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113434

Richard Biener  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org
   Priority|P3  |P2

--- Comment #2 from Richard Biener  ---
It needs LIM (store-motion) to make 'a' a register inside the loop but that
runs after VRP1, the next VRP only runs after SCCP and also IVOPTs which
confuses it.  With -fno-ivopts it's OK but still too late for SCCP.

Thus, a pass ordering issue between LIM / VRP and a missed VRP after IVOPTs
obfuscation.

We might want to consider doing store-motion even earlier ...

[Bug tree-optimization/113434] [13/14 Regression] VRP misses conditional in loop is always false sometimes

2024-01-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113434

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Target Milestone|--- |13.3
   Last reconfirmed||2024-01-17
 Ever confirmed|0   |1
Summary|[13/14 Regression] Missed   |[13/14 Regression] VRP
   |optimization for Loop   |misses conditional in loop
   |Unswitch|is always false sometimes

--- Comment #1 from Andrew Pinski  ---
Confirmed. Note it is not loop switching but rather VRP which should have
figured out a bounds are [2,202] inside the loop but for some reason it is not
able to.