[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrSelection.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Sep 10 20:21:01 PDT 2002
Changes in directory llvm/lib/Target/Sparc:
SparcInstrSelection.cpp updated: 1.70 -> 1.71
---
Log message:
- Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.
---
Diffs of the changes:
Index: llvm/lib/Target/Sparc/SparcInstrSelection.cpp
diff -u llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.70 llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.71
--- llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.70 Mon Sep 9 09:54:21 2002
+++ llvm/lib/Target/Sparc/SparcInstrSelection.cpp Tue Sep 10 20:20:07 2002
@@ -24,9 +24,6 @@
#include <math.h>
using std::vector;
-//************************* Forward Declarations ***************************/
-
-
//************************ Internal Functions ******************************/
@@ -937,15 +934,6 @@
}
-
-// 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 @@
// 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");
More information about the llvm-commits
mailing list