summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2001-10-14 18:10:33 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2001-10-14 18:10:33 +0000
commit1679709b71446cb6b81a953bf9433be5bf49eebe (patch)
tree098a518bcfd4a6cc3fc8dfad2d3c93bfe448e1a1 /llvm/lib/Target/Sparc
parentb3368ac9db775285ef14434e9ab19b7f91a14580 (diff)
downloadbcm5719-llvm-1679709b71446cb6b81a953bf9433be5bf49eebe.tar.gz
bcm5719-llvm-1679709b71446cb6b81a953bf9433be5bf49eebe.zip
Two bug fixes that were suppressing some "load-constant-into-register" instrs.
llvm-svn: 795
Diffstat (limited to 'llvm/lib/Target/Sparc')
-rw-r--r--llvm/lib/Target/Sparc/SparcInstrSelection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
index 891c319c009..d303f8eb905 100644
--- a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
+++ b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
@@ -1146,7 +1146,7 @@ CreateLoadConstInstr(const TargetMachine &target,
TmpInstruction*
InsertCodeToLoadConstant(ConstPoolVal* opValue,
Instruction* vmInstr,
- vector<MachineInstr*> loadConstVec,
+ vector<MachineInstr*>& loadConstVec,
TargetMachine& target)
{
// value is constant and must be loaded into a register.
@@ -1244,7 +1244,7 @@ FixConstantOperands(const InstructionNode* vmInstrNode,
// have no immediate fields, so the constant always needs to be loaded
// into a register.
//
- for (unsigned i=1, N=minstr->getNumImplicitRefs(); i < N; ++i)
+ for (unsigned i=0, N=minstr->getNumImplicitRefs(); i < N; ++i)
if (isa<ConstPoolVal>(minstr->getImplicitRef(i)))
{
TmpInstruction* tmpReg = InsertCodeToLoadConstant((ConstPoolVal*)
OpenPOWER on IntegriCloud