On Wed, 11 Feb 2026, Jakub Jelinek wrote: > On Tue, Feb 10, 2026 at 10:59:13AM +0100, Richard Biener wrote: > > The following adds a heuristic to ifcombine that avoids turning > > analyzable loop exits into unanalyzable ones. This allows vectorizing > > the testcase in the PR again. I've refrained from actually > > analyzing niters but instead used a cheaper heuristic. I believe > > we'll only ever attempt to combine two ifs if they are in the same > > loop and if either both exit the loop or stay within. > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. > > > > PR tree-optimization/107690 > > * tree-ssa-ifcombine.cc (ifcombine_ifandif): Do not merge > > possibly analyzable exit conditions. > > > > * g++.dg/vect/vect-pr107690.cc: New testcase. > > I think this regressed > +FAIL: gcc.dg/guality/pr54693-2.c -O2 -DPREVENT_OPTIMIZATION line 21 x == > 10 - i > +FAIL: gcc.dg/guality/pr54693-2.c -O2 -flto -DPREVENT_OPTIMIZATION line 21 > x == 10 - i > +FAIL: gcc.dg/guality/pr54693-2.c -O2 -flto -flto-partition=none > -DPREVENT_OPTIMIZATION line 21 x == 10 - i > +FAIL: gcc.dg/guality/pr54693-2.c -O3 -fomit-frame-pointer -funroll-loops > -fpeel-loops -ftracer -finline-functions -DPREVENT_OPTIMIZATION line 21 x > == 10 - i > +FAIL: gcc.dg/guality/pr54693-2.c -O3 -g -DPREVENT_OPTIMIZATION line 21 x > == 10 - i > on i686-linux and > +FAIL: gcc.dg/guality/pr54693-2.c -O2 -DPREVENT_OPTIMIZATION line 21 x == > 10 - i > +FAIL: gcc.dg/guality/pr54693-2.c -O2 -flto -fno-use-linker-plugin > -flto-partition=none -DPREVENT_OPTIMIZATION line 21 x == 10 - i > +FAIL: gcc.dg/guality/pr54693-2.c -O3 -fomit-frame-pointer -funroll-loops > -fpeel-loops -ftracer -finline-functions -DPREVENT_OPTIMIZATION line 21 x > == 10 - i > +FAIL: gcc.dg/guality/pr54693-2.c -O3 -g -DPREVENT_OPTIMIZATION line 21 x > == 10 - i > on x86_64-linux.
Yes, this was noted already. We eliminate an extra IV now during IVOPTs. I can either do -fno-tree-ivopts or XFAIL. What do you prefer? Richard.
