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:
d74634a
)
Little patch to turn (shl (add X, 123), 4) -> (add (shl X, 4), 123 << 4)
author
Chris Lattner
<sabre@nondot.org>
Fri, 8 Oct 2004 03:46:20 +0000
(
03:46
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 8 Oct 2004 03:46:20 +0000
(
03:46
+0000)
This triggers in cases of bitfield additions, opening opportunities for
future improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16834
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 767fc9582b0777068e39ab31af526d23b5715236..3febd1dd46ff4b469604f4073a47d239cb192bbc 100644
(file)
--- a/
lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/
lib/Transforms/Scalar/InstructionCombining.cpp
@@
-2496,6
+2496,9
@@
Instruction *InstCombiner::visitShiftInst(ShiftInst &I) {
switch (Op0BO->getOpcode()) {
default: isValid = false; break; // Do not perform transform!
+ case Instruction::Add:
+ isValid = isLeftShift;
+ break;
case Instruction::Or:
case Instruction::Xor:
highBitSet = false;