summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FixupSetCC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/X86/X86FixupSetCC.cpp')
-rw-r--r--llvm/lib/Target/X86/X86FixupSetCC.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86FixupSetCC.cpp b/llvm/lib/Target/X86/X86FixupSetCC.cpp
index 421e6e0ba8a..5bfad71ec05 100644
--- a/llvm/lib/Target/X86/X86FixupSetCC.cpp
+++ b/llvm/lib/Target/X86/X86FixupSetCC.cpp
@@ -102,7 +102,7 @@ X86FixupSetCCPass::findFlagsImpDef(MachineBasicBlock *MBB,
auto MBBStart = MBB->rend();
for (int i = 0; (i < SearchBound) && (MI != MBBStart); ++i, ++MI)
for (auto &Op : MI->implicit_operands())
- if ((Op.getReg() == X86::EFLAGS) && (Op.isDef()))
+ if (Op.isReg() && (Op.getReg() == X86::EFLAGS) && Op.isDef())
return &*MI;
return nullptr;
@@ -110,7 +110,7 @@ X86FixupSetCCPass::findFlagsImpDef(MachineBasicBlock *MBB,
bool X86FixupSetCCPass::impUsesFlags(MachineInstr *MI) {
for (auto &Op : MI->implicit_operands())
- if ((Op.getReg() == X86::EFLAGS) && (Op.isUse()))
+ if (Op.isReg() && (Op.getReg() == X86::EFLAGS) && Op.isUse())
return true;
return false;
OpenPOWER on IntegriCloud