diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/Constants.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 2a9af77ef6..e796bad836 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -940,6 +940,8 @@ Constant *ConstantExpr::getCast(Constant *C, const Type *Ty) { Constant *ConstantExpr::getTy(const Type *ReqTy, unsigned Opcode, Constant *C1, Constant *C2) { + if (Opcode == Instruction::Shl || Opcode == Instruction::Shr) + return getShiftTy(ReqTy, Opcode, C1, C2); // Check the operands for consistency first assert((Opcode >= Instruction::BinaryOpsBegin && Opcode < Instruction::BinaryOpsEnd) && |