https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103932
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- And the reason why the == 0 does not combine (at the RTL level) with the builtin is because the shift clobbers CC: (insn 13 12 14 2 (parallel [ (set (reg:DI 90) (ashift:DI (reg:DI 89 [ n ]) (const_int 4 [0x4]))) (clobber (reg:CC 17 flags)) ]) "/app/example.cpp":58:13 710 {*ashldi3_1} (expr_list:REG_DEAD (reg:DI 89 [ n ]) (expr_list:REG_UNUSED (reg:CC 17 flags) (nil))))