projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81ebc30
)
Make ConstantExpr::get work for shifts as well
author
Chris Lattner
<sabre@nondot.org>
Mon, 12 Jan 2004 19:04:55 +0000
(19:04 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 12 Jan 2004 19:04:55 +0000
(19:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10790
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Constants.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Constants.cpp
b/lib/VMCore/Constants.cpp
index 2a9af77ef6adbef39f758a63c8bc2dced5af85ac..e796bad8360e171695ee75a4e690a9069d5ffdf2 100644
(file)
--- 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) &&