https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127998
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2026-10-19
--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
# RANGE [irange] int [31, 32] MASK 0x3f VALUE 0x0
int v2_5(D) = v2;
# RANGE [irange] int [192, 193] MASK 0x1 VALUE 0xc0
int v3_6(D) = v3;
# RANGE [irange] int [222, 225] MASK 0x3f VALUE 0xc0
_1 = v2_5(D) ^ v3_6(D);
# RANGE [irange] int [13, 14] MASK 0x3 VALUE 0xc
_7 = _1 >> 4;
# RANGE [irange] int [5, 6] MASK 0x3 VALUE 0x4
i2_9 = _7 ^ 8;
GCC does not recognize `v3_6(D) >> 4` will always be 12 (0xc). So it can be
replaced with just `12 << 4` and then we optimize down to:
_1 = v2_5(D) >> 4;
i2_9 = _1 ^ 0x4;
And then we know that ^ can be expanded as AOP to get what is gotten from
clang/LLVM.
Note, this might be handled by Robin's patch to backprop but I have not checked
yet.