summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-04 19:54:45 +0000
committerChris Lattner <sabre@nondot.org>2010-03-04 19:54:45 +0000
commit795667b4241cecc79d25c2c6af9e18399e1f1d2d (patch)
treef1277bef95caf2119f59ecb89b771835acee685a
parent6ce8e24b7061cda389001c3de151015bf9051ab3 (diff)
downloadbcm5719-llvm-795667b4241cecc79d25c2c6af9e18399e1f1d2d.tar.gz
bcm5719-llvm-795667b4241cecc79d25c2c6af9e18399e1f1d2d.zip
not committing what you test = bad.
llvm-svn: 97740
-rw-r--r--llvm/lib/Target/X86/X86FastISel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp
index c6da5cc437d..98e3f4efe58 100644
--- a/llvm/lib/Target/X86/X86FastISel.cpp
+++ b/llvm/lib/Target/X86/X86FastISel.cpp
@@ -388,6 +388,8 @@ bool X86FastISel::X86SelectAddress(Value *V, X86AddressMode &AM) {
}
case Instruction::GetElementPtr: {
+ X86AddressMode SavedAM = AM;
+
// Pattern-match simple GEPs.
uint64_t Disp = (int32_t)AM.Disp;
unsigned IndexReg = AM.IndexReg;
@@ -425,7 +427,6 @@ bool X86FastISel::X86SelectAddress(Value *V, X86AddressMode &AM) {
break;
// Ok, the GEP indices were covered by constant-offset and scaled-index
// addressing. Update the address state and move on to examining the base.
- X86AddressMode SavedAM = AM;
AM.IndexReg = IndexReg;
AM.Scale = Scale;
AM.Disp = (uint32_t)Disp;
OpenPOWER on IntegriCloud