[llvm] [X86] Resolve FIXME: Add FPCW as a rounding control register (PR #82452)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 3 19:03:16 PST 2024
================
@@ -115,7 +115,8 @@ bool WaitInsert::runOnMachineFunction(MachineFunction &MF) {
// If the following instruction is an X87 instruction and isn't an X87
// non-waiting control instruction, we can omit insert wait instruction.
MachineBasicBlock::iterator AfterMI = std::next(MI);
- if (AfterMI != MBB.end() && X86::isX87Instruction(*AfterMI) &&
+ if (AfterMI != MBB.end() && !AfterMI->isCall() &&
+ X86::isX87Instruction(*AfterMI) &&
!isX87NonWaitingControlInstruction(*AfterMI))
----------------
phoebewang wrote:
Because the code in `isX87Instruction` just checked for X87 registers before. Call defs X87 register but should not be classified as X87 instruction.
https://github.com/llvm/llvm-project/pull/82452
More information about the llvm-commits
mailing list