https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86605
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #3) > So on the trunk we get: > if (&test != 4B) > goto <bb 4>; [70.00%] > else > goto <bb 3>; [30.00%] > > <bb 3> [local count: 322122544]: > > <bb 4> [local count: 1073741824]: > # iftmp.0_3 = PHI <10(2), 20(3)> > > I know we fold &v != 0B but it seems like if the constant is within a few > bytes of 0, we should fold it similar. Shouldn't we? Interesting we fold "&test != 4B" on aarch64-linux-gnu but not on x86_64-linux-gnu. If we change 4 to 16, we don't fold on either.