mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 09:45:00 +00:00
Make ConstantExpr::get work for shifts as well
llvm-svn: 10790
This commit is contained in:
parent
23da5dbed6
commit
52759f5c5e
@ -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) &&
|
||||
|
Loading…
Reference in New Issue
Block a user