[PATCH] D105762: [X86] Teach X86FloatingPoint's handleCall to only erase the FP stack if there is a regmask operand that clobbers the FP stack.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 10 19:33:43 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/X86/X86FloatingPoint.cpp:988-989
MachineOperand &Op = MI.getOperand(i);
+ // Check if this call clobbers the FP stack.
+ // is sufficient.
+ if (Op.isRegMask()) {
----------------
craig.topper wrote:
> pengfei wrote:
> > I found we don't clobber FP stack by default. E.g. `void foo(void)`. The interesting thing is even if we passing registers to/from foo, e.g. `long double foo(void)` or `long double foo(long double)`, the regmasks of FP are still 0.
> > Did I misunderstand something here?
> The regmask bits indicate which registers aren't clobbered. So a 0 means clobbered.
It's created from the callee saved register mask.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105762/new/
https://reviews.llvm.org/D105762
More information about the llvm-commits
mailing list