mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-12 01:25:49 +00:00
Make ConstantExpr::get work for shifts as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10790 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -940,6 +940,8 @@ Constant *ConstantExpr::getCast(Constant *C, const Type *Ty) {
|
|||||||
|
|
||||||
Constant *ConstantExpr::getTy(const Type *ReqTy, unsigned Opcode,
|
Constant *ConstantExpr::getTy(const Type *ReqTy, unsigned Opcode,
|
||||||
Constant *C1, Constant *C2) {
|
Constant *C1, Constant *C2) {
|
||||||
|
if (Opcode == Instruction::Shl || Opcode == Instruction::Shr)
|
||||||
|
return getShiftTy(ReqTy, Opcode, C1, C2);
|
||||||
// Check the operands for consistency first
|
// Check the operands for consistency first
|
||||||
assert((Opcode >= Instruction::BinaryOpsBegin &&
|
assert((Opcode >= Instruction::BinaryOpsBegin &&
|
||||||
Opcode < Instruction::BinaryOpsEnd) &&
|
Opcode < Instruction::BinaryOpsEnd) &&
|
||||||
|
Reference in New Issue
Block a user