[all-commits] [llvm/llvm-project] d5c97f: [X86] Teach X86FloatingPoint's handleCall to only ...
Craig Topper via All-commits
all-commits at lists.llvm.org
Mon Jul 12 10:16:18 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d5c97f4bf0449f8a4ad6260c75cbf6ff3605ac04
https://github.com/llvm/llvm-project/commit/d5c97f4bf0449f8a4ad6260c75cbf6ff3605ac04
Author: Craig Topper <craig.topper at sifive.com>
Date: 2021-07-12 (Mon, 12 Jul 2021)
Changed paths:
M llvm/lib/Target/X86/X86FloatingPoint.cpp
A llvm/test/CodeGen/X86/pr50782.ll
Log Message:
-----------
[X86] Teach X86FloatingPoint's handleCall to only erase the FP stack if there is a regmask operand that clobbers the FP stack.
There are some calls to functions like `__alloca` that are missing
a regmask operand. Lack of a regmask operand means that all
registers that aren't mentioned by def operands are preserved.
__alloca only updates EAX and ESP and has def operands for
them so this is ok. Because there is no regmask the register
allocator won't spill the FP registers across the call. Assuming
we want to keep the FP stack untoched across these calls, we
need to handle this is in the FP stackifier.
We might want to add a proper regmask operand to the code that
creates these calls to indicate all registers are preserved, but we'd
still need this change to the FP stackifier to know to preserve the
FP stack for such a regmask.
The test is kind of long, but bugpoint wasn't able to reduce it
any further.
Fixes PR50782
Reviewed By: pengfei
Differential Revision: https://reviews.llvm.org/D105762
More information about the All-commits
mailing list