This appears to fix Bug 172 and does not break any other feature tests or
authorJohn Criswell <criswell@uiuc.edu>
Wed, 10 Dec 2003 22:51:41 +0000 (22:51 +0000)
committerJohn Criswell <criswell@uiuc.edu>
Wed, 10 Dec 2003 22:51:41 +0000 (22:51 +0000)
regression tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10388 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp

index 44a43596ee3bc1b57a3454e7df90e15b804c6227..73e5480d1227418a07d80d6a8da6d910faf345ef 100644 (file)
@@ -167,6 +167,12 @@ FixConstantOperandsForInstr(Instruction* vmInstr,
             constantThatMustBeLoaded = true;
         }
       } else {
             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;
 
         assert(mop.isImmediate());
         bool isSigned = mop.getType() == MachineOperand::MO_SignExtendedImmed;
 
index 44a43596ee3bc1b57a3454e7df90e15b804c6227..73e5480d1227418a07d80d6a8da6d910faf345ef 100644 (file)
@@ -167,6 +167,12 @@ FixConstantOperandsForInstr(Instruction* vmInstr,
             constantThatMustBeLoaded = true;
         }
       } else {
             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;
 
         assert(mop.isImmediate());
         bool isSigned = mop.getType() == MachineOperand::MO_SignExtendedImmed;