diff options
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index e82f373..b06cffd 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -6553,8 +6553,7 @@ Instruction *InstCombiner::visitSelectInst(SelectInst &SI) { // select true, X, Y -> X // select false, X, Y -> Y if (ConstantInt *C = dyn_cast<ConstantInt>(CondVal)) - if (C->getType() == Type::BoolTy) - return ReplaceInstUsesWith(SI, C->getBoolValue() ? TrueVal : FalseVal); + return ReplaceInstUsesWith(SI, C->getBoolValue() ? TrueVal : FalseVal); // select C, X, X -> X if (TrueVal == FalseVal) |