[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 11:59:46 PDT 2021


craig.topper created this revision.
craig.topper added reviewers: rnk, spatel, RKSimon, pengfei.
Herald added a subscriber: hiraditya.
craig.topper requested review of this revision.
Herald added a project: LLVM.

There are some calls to functions like __alloca that are missing
a regmask operand that clobbers the FP registers. __alloca
only updates EAX and ESP so this isn't wrong. Becuase there is
no regmask the register allocator won't spill the FP registers
across the call. Assuming we want to preserve the FP stack for
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, but we'd still need this change to the FP
stackifier if we preserve the FP stack.

The test is kind of long, but bugpoint wasn't able to reduce it
any further.

Fixes PR50782


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105762

Files:
  llvm/lib/Target/X86/X86FloatingPoint.cpp
  llvm/test/CodeGen/X86/pr50782.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105762.357743.patch
Type: text/x-patch
Size: 6146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210710/afd92b69/attachment.bin>


More information about the llvm-commits mailing list