[PATCH] D151848: [X86, Peephole] Enable FoldImmediate for X86
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 20 16:23:45 PDT 2023
MatzeB added inline comments.
================
Comment at: llvm/lib/Target/X86/X86InstrInfo.cpp:4800-4816
+/// Conservatively check if there is live EFLAGS reaching MI.
+static bool LiveEFLAGS(MachineInstr *MI, const TargetRegisterInfo *TRI) {
+ MachineBasicBlock *MBB = MI->getParent();
+ MachineBasicBlock::iterator I(MI);
+ while (true) {
+ if (I == MBB->begin())
+ break;
----------------
Does `MachineBasicBlock::computeRegisterLiveness` work instead?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151848/new/
https://reviews.llvm.org/D151848
More information about the llvm-commits
mailing list