[Bug rtl-optimization/123333] Failure to optimize away if-then-else with a compile-time computable condition
law at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 10 22:08:00 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123333
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #3 from Jeffrey A. Law <law at gcc dot gnu.org> ---
This seems to have been fixed for gcc-17. In the .combine dump it gets
simplified here:
Trying 30, 39, 38 -> 40:
30: r157:DI=0x880
39: r166:DI=0x1
38: r165:DI=r155:DI&r157:DI
REG_DEAD r155:DI
REG_DEAD r157:DI
40: pc={(r165:DI==r166:DI)?L45:pc}
REG_DEAD r166:DI
REG_DEAD r165:DI
REG_BR_PROB 365072225
Failed to match this instruction:
(set (pc)
(pc))
More information about the Gcc-bugs
mailing list