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:
62990ba
)
Have FastISel skip the multiply by 1 for getelementptr on i8*.
author
Dan Gohman
<gohman@apple.com>
Thu, 21 Aug 2008 17:37:05 +0000
(17:37 +0000)
committer
Dan Gohman
<gohman@apple.com>
Thu, 21 Aug 2008 17:37:05 +0000
(17:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55129
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/FastISel.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/FastISel.cpp
b/lib/CodeGen/SelectionDAG/FastISel.cpp
index 71042ff277a25fde8dbe931adfc20283486efe16..450596e50d01f605713bd79b6034ed78df3a99f5 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/
lib/CodeGen/SelectionDAG/FastISel.cpp
@@
-124,10
+124,8
@@
bool FastISel::SelectGetElementPtr(Instruction *I,
// Unhandled operand. Halt "fast" selection and bail.
return false;
- // FIXME: If multiple is power of two, turn it into a shift. The
- // optimization should be in FastEmit_ri?
- IdxN = FastEmit_ri_(VT, ISD::MUL, IdxN,
- ElementSize, VT);
+ if (ElementSize != 1)
+ IdxN = FastEmit_ri_(VT, ISD::MUL, IdxN, ElementSize, VT);
if (IdxN == 0)
// Unhandled operand. Halt "fast" selection and bail.
return false;