[PATCH] D140045: [X86] Move RDFLAGS/WRFLAGS expansion until after RA
Bill Wendling via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 14 12:14:55 PST 2022
void created this revision.
void added reviewers: craig.topper, nickdesaulniers, arsenm, efriedma.
Herald added subscribers: StephenFan, pengfei, hiraditya.
Herald added a project: All.
void requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
The register allocator may introduce reloads in the middle of reading
and writing the EFLAGS register, due to the RDFLAGS & WRFLAGS pseudos
being expanded before RA. This may cause an issue where the stack
pointer was adjusted but the stack offset for the reload wasn't
accounted for (see [1]).
To avoid this, expand these pseudos after register allocation.
[1] https://github.com/llvm/llvm-project/issues/59102
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D140045
Files:
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/lib/Target/X86/X86InstrInfo.td
llvm/test/CodeGen/X86/eflags.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140045.482958.patch
Type: text/x-patch
Size: 11673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221214/a9ac18f9/attachment.bin>
More information about the llvm-commits
mailing list