[PATCH] D73475: [X86] Make sure we do not clobber RBX with mwaitx when used as a base pointer.
pierre gousseau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 07:16:40 PST 2020
pgousseau created this revision.
pgousseau added reviewers: qcolombet, filcab, GGanesh, RKSimon, rob.lougher, andreadb, craig.topper.
Herald added subscribers: llvm-commits, jfb, hiraditya.
Herald added a project: LLVM.
mwaitx uses EBX as one of its argument.
Using this instruction clobbers RBX as it is defined to hold one of the input. When the backend uses dynamically allocated stack, RBX is used as a reserved register for the base pointer.
This patch is adapted from @qcolombet patch for cmpxchg at r263325.
This fixes PR43528.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73475
Files:
llvm/lib/Target/X86/X86ExpandPseudo.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.h
llvm/lib/Target/X86/X86InstrCompiler.td
llvm/lib/Target/X86/X86InstrInfo.td
llvm/test/CodeGen/X86/base-pointer-and-mwaitx.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73475.240567.patch
Type: text/x-patch
Size: 10325 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200127/6d343861/attachment.bin>
More information about the llvm-commits
mailing list