https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111267
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rsandifo at gcc dot gnu.org --- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- Yes, this is basically "folding", and across multiple insns this requires fwprop or combine. 9: r111:TI=zero_extend(r112:DI) 10: r111:TI=r111:TI&<0,0xffffffffffffffff>|zero_extend(r113:DI)<<0x40 74: r137:DI=r111:TI#0 75: r138:DI=r111:TI#8 I'm not sure fwprop even tries to do 9->10->74 though. The suggested change to drop the call to "profitable" seems to remove any cost checking done (and is also not consistent with the other call we do on notes?). Would ssa-combine have catched the above?