[Bug tree-optimization/119420] `a >> 1 == 0` should be trasformed into `((unsigned)a) <= 1`
law at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Dec 7 19:17:46 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119420
--- Comment #2 from Jeffrey A. Law <law at gcc dot gnu.org> ---
I'd marked this at some point for investigation on risc-v. I think one of the
recent changes squashed all these into something sensible:
sltiu a0,a0,2 # 12 [c=8 l=4] *riscv.md:3766
ret # 25 [c=0 l=4] simple_return
More information about the Gcc-bugs
mailing list