diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 36ef7dca1f3..1eddb27847d 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -2640,6 +2640,11 @@ bool X86InstrInfo::AnalyzeBranchImpl( if (BranchCode == X86::COND_INVALID) return true; // Can't handle indirect branch. + // In practice we should never have an undef eflags operand, if we do + // abort here as we are not prepared to preserve the flag. + if (I->getOperand(1).isUndef()) + return true; + // Working from the bottom, handle the first conditional branch. if (Cond.empty()) { MachineBasicBlock *TargetBB = I->getOperand(0).getMBB(); |