[PATCH] D113335: [X86] Preserve FPSW when popping x87 stack
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 6 20:12:20 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/X86/X86FloatingPoint.cpp:838
+ const MachineOperand &MO = MI.getOperand(i);
+ if (MO.isReg() && MO.getReg() == X86::FPSW && MO.isDef() && !MO.isDead())
+ return true;
----------------
Can this use MachineInstr::findRegisterDefOperand? You'll have to check the dead isDead flag after.
================
Comment at: llvm/lib/Target/X86/X86FloatingPoint.cpp:847
+ const MachineOperand &MO = MI.getOperand(i);
+ if (MO.isReg() && MO.getReg() == X86::FPSW && MO.isUse())
+ return true;
----------------
Can this use MachineInstr::readsRegister
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113335/new/
https://reviews.llvm.org/D113335
More information about the llvm-commits
mailing list