summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-09-11 01:21:35 +0000
committerChris Lattner <sabre@nondot.org>2002-09-11 01:21:35 +0000
commite314bf5264a5b57843b3a181c809de9e0d1426cb (patch)
tree887a3a16818fdb0122bd181ef5264d5ad0da4741 /llvm/lib/Target/Sparc
parent136dab7d86c77c69aae948501065432e8b9b1ced (diff)
downloadbcm5719-llvm-e314bf5264a5b57843b3a181c809de9e0d1426cb.tar.gz
bcm5719-llvm-e314bf5264a5b57843b3a181c809de9e0d1426cb.zip
- Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types. llvm-svn: 3683
Diffstat (limited to 'llvm/lib/Target/Sparc')
-rw-r--r--llvm/lib/Target/Sparc/SparcInstrSelection.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
index 6c5caaf6bff..ce7e4dc0d92 100644
--- a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
+++ b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
@@ -24,9 +24,6 @@
#include <math.h>
using std::vector;
-//************************* Forward Declarations ***************************/
-
-
//************************ Internal Functions ******************************/
@@ -937,15 +934,6 @@ CreateCodeForFixedSizeAlloca(const TargetMachine& target,
}
-
-// Check for a constant (uint) 0.
-inline bool
-IsZero(Value* idx)
-{
- return (isa<ConstantInt>(idx) && cast<ConstantInt>(idx)->isNullValue());
-}
-
-
//------------------------------------------------------------------------
// Function SetOperandsForMemInstr
//
@@ -1004,7 +992,8 @@ SetOperandsForMemInstr(vector<MachineInstr*>& mvec,
// offset. (An extra leading zero offset, if any, can be ignored.)
// Generate code sequence to compute address from index.
//
- bool firstIdxIsZero = IsZero(idxVec[0]);
+ bool firstIdxIsZero =
+ (idxVec[0] == Constant::getNullValue(idxVec[0]->getType()));
assert(idxVec.size() == 1U + firstIdxIsZero
&& "Array refs must be lowered before Instruction Selection");
OpenPOWER on IntegriCloud