https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124808
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-04-08
Ever confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. Though I think the real issue is not converting:
int f(int i) {
return i>>3 < 7;
}
into:
int g (int i) {
return i<=55;
}
At the gimple level.
> li a7, 55
> bltu a7, a1, .LBB0_1
That is what you see in LLVM code.
While in GCC code we have:
li a1,7
...
addiw a5,a4,8
srai a3,a4,3 ;;;
bset a5,x0,a5
beq a3,a1,.L2 ;;;
Which is `a4 >> 3 == 7`.
Once we do that manually, then lsplit actually splits up the loop and we can
vectorize it.
The original loop is slightly more complex though but I think lsplit will split
up the loop anyways.