aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Criswell <criswell@uiuc.edu>2003-12-10 22:51:41 +0000
committerJohn Criswell <criswell@uiuc.edu>2003-12-10 22:51:41 +0000
commitf5ba89df1fb9d52bf6b7ba1def6bd00b8b668336 (patch)
tree05d2594ad12dd130d31c3735c321c0057ae46f88 /lib
parent7d3ced934f1bb2c6845676c7333ef879d5219e88 (diff)
downloadexternal_llvm-f5ba89df1fb9d52bf6b7ba1def6bd00b8b668336.zip
external_llvm-f5ba89df1fb9d52bf6b7ba1def6bd00b8b668336.tar.gz
external_llvm-f5ba89df1fb9d52bf6b7ba1def6bd00b8b668336.tar.bz2
This appears to fix Bug 172 and does not break any other feature tests or
regression tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10388 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp6
-rw-r--r--lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp6
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
index 44a4359..73e5480 100644
--- a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
+++ b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
@@ -167,6 +167,12 @@ FixConstantOperandsForInstr(Instruction* vmInstr,
constantThatMustBeLoaded = true;
}
} else {
+ //
+ // If the operand is from the constant pool, don't try to change it.
+ //
+ if (mop.getType() == MachineOperand::MO_ConstantPoolIndex) {
+ continue;
+ }
assert(mop.isImmediate());
bool isSigned = mop.getType() == MachineOperand::MO_SignExtendedImmed;
diff --git a/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp b/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp
index 44a4359..73e5480 100644
--- a/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp
+++ b/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp
@@ -167,6 +167,12 @@ FixConstantOperandsForInstr(Instruction* vmInstr,
constantThatMustBeLoaded = true;
}
} else {
+ //
+ // If the operand is from the constant pool, don't try to change it.
+ //
+ if (mop.getType() == MachineOperand::MO_ConstantPoolIndex) {
+ continue;
+ }
assert(mop.isImmediate());
bool isSigned = mop.getType() == MachineOperand::MO_SignExtendedImmed;