OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45ccae5
)
Don't match x << 1 to LEAL. It's better to emit x + x.
author
Evan Cheng
<evan.cheng@apple.com>
Tue, 28 Feb 2006 21:13:57 +0000
(21:13 +0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Tue, 28 Feb 2006 21:13:57 +0000
(21:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26429
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/X86/X86ISelDAGToDAG.cpp
b/lib/Target/X86/X86ISelDAGToDAG.cpp
index
9ef20da
..
3cf3671
100644
(file)
--- a/
lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/
lib/Target/X86/X86ISelDAGToDAG.cpp
@@
-453,8
+453,11
@@
bool X86DAGToDAGISel::SelectLEAAddr(SDOperand N, SDOperand &Base,
else
AM.IndexReg = CurDAG->getRegister(0, MVT::i32);
- if (AM.Scale >
1)
+ if (AM.Scale >
2)
Complexity += 2;
+ // Don't match just leal(,%reg,2). It's cheaper to do addl %reg, %reg
+ else if (AM.Scale > 1)
+ Complexity++;
// FIXME: We are artificially lowering the criteria to turn ADD %reg, $GA
// to a LEA. This is determined with some expermentation but is by no means