In function searchALUInst, sub register usage of LEA dest should also block LEA/SUB optimization, otherwise the sub register usage gets an undefined value.
This patch fixes https://bugs.llvm.org/show_bug.cgi?id=50615.
Paths
| Differential D103922
[X86FixupLEAs] Sub register usage of LEA dest should block LEA/SUB optimization ClosedPublic Authored by Carrot on Jun 8 2021, 12:11 PM.
Details Summary In function searchALUInst, sub register usage of LEA dest should also block LEA/SUB optimization, otherwise the sub register usage gets an undefined value. This patch fixes https://bugs.llvm.org/show_bug.cgi?id=50615.
Diff Detail
Event Timeline
Carrot marked an inline comment as done. Comment Actions I confirm that the initial miscompile we found gets fixed by this patch. I can't approve the patch because I'm not familiar with the component though. This revision is now accepted and ready to land.Jun 11 2021, 1:29 AM This revision was landed with ongoing or failed builds.Jun 11 2021, 9:46 AM Closed by commit rGf35bcea1d474: [X86FixupLEAs] Sub register usage of LEA dest should block LEA/SUB optimization (authored by Carrot). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 351483 llvm/lib/Target/X86/X86FixupLEAs.cpp
llvm/test/CodeGen/X86/lea-opt2.ll
|
Please can you reference PR50615 in the comment for future reference