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:
c739489
)
Mark lea fi# as being really rematerializable.
author
Dan Gohman
<gohman@apple.com>
Fri, 26 Sep 2008 21:30:20 +0000
(21:30 +0000)
committer
Dan Gohman
<gohman@apple.com>
Fri, 26 Sep 2008 21:30:20 +0000
(21:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56698
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/X86/X86InstrInfo.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/X86/X86InstrInfo.cpp
b/lib/Target/X86/X86InstrInfo.cpp
index c19628b81b53e3fe51571dfd265b0d3797948e98..c275418ddd8749ff0d6d8e2d95fc955216e4c1b6 100644
(file)
--- a/
lib/Target/X86/X86InstrInfo.cpp
+++ b/
lib/Target/X86/X86InstrInfo.cpp
@@
-819,11
+819,12
@@
X86InstrInfo::isReallyTriviallyReMaterializable(const MachineInstr *MI) const {
case X86::LEA32r:
case X86::LEA64r: {
- if (MI->getOperand(1).isRegister() &&
- MI->getOperand(2).isImmediate() &&
+ if (MI->getOperand(2).isImmediate() &&
MI->getOperand(3).isRegister() && MI->getOperand(3).getReg() == 0 &&
!MI->getOperand(4).isRegister()) {
// lea fi#, lea GV, etc. are all rematerializable.
+ if (!MI->getOperand(1).isRegister())
+ return true;
unsigned BaseReg = MI->getOperand(1).getReg();
if (BaseReg == 0)
return true;