aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/ExprTypeConvert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/ExprTypeConvert.cpp')
-rw-r--r--lib/Transforms/ExprTypeConvert.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp
index dee0c2026e..92a88773a0 100644
--- a/lib/Transforms/ExprTypeConvert.cpp
+++ b/lib/Transforms/ExprTypeConvert.cpp
@@ -658,7 +658,7 @@ static bool OperandConvertableToType(User *U, Value *V, const Type *Ty,
if (Ty->isSigned() != V->getType()->isSigned()) return false;
// FALL THROUGH
case Instruction::Shl:
- assert(I->getOperand(0) == V);
+ if (I->getOperand(1) == V) return false; // Cannot change shift amount type
if (!Ty->isInteger()) return false;
return ValueConvertableToType(I, Ty, CTMap);