diff options
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstructionCombining.cpp')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index b158e0f..27ec6c6 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -1758,6 +1758,9 @@ static Value *simplifyOperationIntoSelectOperand(Instruction &I, SelectInst *SI, m_Specific(Op), m_Value(V))) && isGuaranteedNotToBeUndefOrPoison(V)) { // Pass + } else if (match(Op, m_ZExt(m_Specific(SI->getCondition())))) { + V = IsTrueArm ? ConstantInt::get(Op->getType(), 1) + : ConstantInt::getNullValue(Op->getType()); } else { V = Op; } |
