On 6/15/2026 6:10 AM, Richard Biener wrote: > The following enhances fold_plusminus_mult_expr to catch > a * -4U + b * 4 and factor it as (a * -1u + b) * 4. This > does not work currently because we're using HOST_WIDE_INT > arithmetic. Switch that to wide_int, which makes the > folding apply more consistently. > > For gcc.dg/loop-versioning-13.c the heuristics in > gimple-loop-versioning.cc get confused as they fail to > truncate some computations. I did not inverstigate further. s/inverstigate/investigate/
> > Bootstrapped and tested on x86_64-unknown-linux-gnu and > aarch64-suse-linux-gnu where now gcc.target/aarch64/sve/noeffect7.c > fails (both memory access pairs now generate similar code). > > OK? > > This is a requirement to fix the wrong-code issue fixed with [2/2] > > Thanks, > Richard. > > * fold-const.cc (fold_plusminus_mult_expr): Use > wide_int for the case of two INTEGER_CST multiplicands. > > * gcc.dg/loop-versioning-13.c: XFAIL one transfor for ilp32. > * gcc.dg/pr109393.c: Remove XFAIL for ilp32. OK Jeff
