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:
078b631
)
this can be trunc or bitcast, per line 3092.
author
Chris Lattner
<sabre@nondot.org>
Tue, 12 Dec 2006 19:11:20 +0000
(19:11 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 12 Dec 2006 19:11:20 +0000
(19:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32487
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index d15a843d4086561003022008f16d1a2e9a50594e..a1ed221a7e1bb522623d981a9ab88d0e5b36763e 100644
(file)
--- a/
lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/
lib/Transforms/Scalar/InstructionCombining.cpp
@@
-3112,7
+3112,7
@@
Instruction *InstCombiner::visitAnd(BinaryOperator &I) {
} else if (CastOp->getOpcode() == Instruction::Or) {
// Change: and (cast (or X, C1) to T), C2
// into : trunc(C1)&C2 iff trunc(C1)&C2 == C2
- Constant *C3 = ConstantExpr::getTrunc
(AndCI,
I.getType());
+ Constant *C3 = ConstantExpr::getTrunc
OrBitCast(AndCI,
I.getType());
if (ConstantExpr::getAnd(C3, AndRHS) == AndRHS) // trunc(C1)&C2
return ReplaceInstUsesWith(I, AndRHS);
}