[Bug tree-optimization/126415] [17 regression] Wrong code at -O2/3/s on x86_64-pc-linux-gnu since r17-2078
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 28 06:45:08 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126415
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
p1.0_1 = (unsigned char) p1_5(D);
_2 = p1.0_1 + 159;
_3 = (char) _2;
- _7 = (unsigned int) _3;
- _10 = _7 + 97;
+ _10 = (unsigned int) p1_5(D);
I'll note that this must be an error in the pattern conditions, that it
"misfires" outside of VN isn't the issue.
This is because even "inside VN" (op! @0 { inner_cst; }) isn't just
a hashtable lookup for the expression itself. Even the hand-coded
variant with vn_nary_build_or_lookup will simplify.
More information about the Gcc-bugs
mailing list