[llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Jan 12 13:06:06 PST 2004
Changes in directory llvm/lib/VMCore:
Constants.cpp updated: 1.64 -> 1.65
---
Log message:
Make ConstantExpr::get work for shifts as well
---
Diffs of the changes: (+2 -0)
Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.64 llvm/lib/VMCore/Constants.cpp:1.65
--- llvm/lib/VMCore/Constants.cpp:1.64 Fri Nov 21 14:23:48 2003
+++ llvm/lib/VMCore/Constants.cpp Mon Jan 12 13:04:55 2004
@@ -940,6 +940,8 @@
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) &&
More information about the llvm-commits
mailing list