https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127606
--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:af377e494233869967d20299bcc228e01f673f46 commit r17-4979-gaf377e494233869967d20299bcc228e01f673f46 Author: Richard Biener <[email protected]> Date: Fri Sep 25 14:04:44 2026 +0200 rtl-optimization/127606 - bogus simplification involving paradoxical subregs combine's distribute_and_simplify_rtx distributes (and (xor B C) (not A)) to (xor (ior A B) (ior A C)), thereby duplicating A. When A is a paradoxical subreg that is spilled the two As can have differing values which now spill into the result as we can no longer rely on the XOR/IOR combination to cancel out those bits. PR rtl-optimization/127606 * combine.cc (distribute_and_simplify_rtx): Gate the (and (xor B C) (not A)) to (xor (ior A B) (ior A C)) distribution on A not containing a paradoxical subreg. * gcc.dg/pr127606.c: New testcase.
