On Thu, 19 Nov 2026, Tamar Christina wrote: > When backporting the fix of updating PHI arguments with SET_PHI_ARG_DEF > in PR128095 test gcc.dg/vect/vect-reduc-cond-2.c started failing on the > branch. > > It didn't fail on master because commit r17-1507-gc43fed44d9a changed > the tests and so hid the problem. > > The code in factor_out_operators dealt with the broken SSA by having > this variable "repeated" which first time around checked for > has_single_use because SSA was up to date. Then when it did the > rewrite for subsequent passes checked has_zero_uses because the SSA > wasn't single use anymore. > > But as far as I can tell, the optimization was always intended to > only work on single use PHIs and the "repeated" thing was just a > hack around the broken SSA. > > This removes the hack and the test now passes. > > Bootstrapped Regtested on aarch64-none-linux-gnu, > arm-none-linux-gnueabihf, x86_64-pc-linux-gnu > -m32, -m64 and no issues. > > I think this is OK, but in case I misunderstood something here.. > > Any feedback? Otherwise I'll push to trunk and GCC 16.
The check is definitely a superset, so OK. Richard. > Sashiko Review: > https://gcc.sashiko.dev/#/patchset/patch-21119-rb-rev-1-tamar%40arm.com > Apply Series: b4 shazam > https://inbox.sourceware.org/gcc-patches/[email protected]/ > > Thanks, > Tamar > > gcc/ChangeLog: > > PR tree-optimization/128095 > * tree-if-conv.cc (factor_out_operators): Fix Checks. > > base-commit: 78c5290e696d76fdbe7f3b006df9145d1ed7927c > > --- > > -- Richard Biener <[email protected]> SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri; (HRB 36809, AG Nuernberg)
