aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-08-03 20:57:38 +0000
committerChris Lattner <sabre@nondot.org>2002-08-03 20:57:38 +0000
commit75ac4e511afe04842dee6b5a1d1db4007d24d1a8 (patch)
treef35e91a1b5502177ce4ab2bddafac263daa41c40
parent7d20fe3727a19be875eca577118b49ffef94eb04 (diff)
Fix compilation problem. IsIndexZero doesn't exist, use IsZero instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3243 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/SparcV9/SparcV9InstrSelection.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Target/SparcV9/SparcV9InstrSelection.cpp b/lib/Target/SparcV9/SparcV9InstrSelection.cpp
index 6b9085b5d3..b9dcd6deb1 100644
--- a/lib/Target/SparcV9/SparcV9InstrSelection.cpp
+++ b/lib/Target/SparcV9/SparcV9InstrSelection.cpp
@@ -1004,8 +1004,8 @@ SetOperandsForMemInstr(vector<MachineInstr*>& mvec,
// Append the index vector of the current instruction, if any.
// Discard any leading [0] index.
if (memInst->getNumIndices() > 0)
- idxVec.insert(idxVec.end(), memInst->idx_begin()
- + (IndexIsZero(*memInst->idx_begin())? 1 : 0),
+ idxVec.insert(idxVec.end(),
+ memInst->idx_begin() + IsZero(*memInst->idx_begin()),
memInst->idx_end());
// Now create the appropriate operands for the machine instruction
@@ -1056,12 +1056,10 @@ SetMemOperands_Internal(vector<MachineInstr*>& mvec,
// offset. (An extra leading zero offset, if any, can be ignored.)
// Generate code sequence to compute address from index.
//
- bool firstIndexIsZero = IndexIsZero(idxVec[0]);
-
- assert(idxVec.size() == 1 + (unsigned) (firstIndexIsZero? 1 : 0)
+ assert(idxVec.size() == 1U + IsZero(idxVec[0])
&& "Array refs must be lowered before Instruction Selection");
- Value* idxVal = idxVec[(firstIndexIsZero? 1 : 0)];
+ Value* idxVal = idxVec[IsZero(idxVec[0])];
vector<MachineInstr*> mulVec;
Instruction* addr = new TmpInstruction(Type::UIntTy, memInst);