/// getAlignment - Return the alignment of the access that is being performed
///
unsigned getAlignment() const {
- signed Log2AlignVal = ((SubclassData>>1)-1);
- return ((Log2AlignVal < 0) ? 0 : 1<<Log2AlignVal);
+ return (1 << (SubclassData>>1)) >> 1;
}
void setAlignment(unsigned Align);
/// getAlignment - Return the alignment of the access that is being performed
///
unsigned getAlignment() const {
- signed Log2AlignVal = ((SubclassData>>1)-1);
- return ((Log2AlignVal < 0) ? 0 : 1<<Log2AlignVal);
+ return (1 << (SubclassData>>1)) >> 1;
}
void setAlignment(unsigned Align);
/// zeros. If so, the result pointer and the first operand have the same
/// value, just potentially different types.
bool hasAllZeroIndices() const;
+
+ /// hasAllConstantIndices - Return true if all of the indices of this GEP are
+ /// constant integers. If so, the result pointer and the first operand have
+ /// a constant offset between them.
+ bool hasAllConstantIndices() const;
+
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const GetElementPtrInst *) { return true; }