Patch by Björn Steinbrink
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216930
91177308-0d34-0410-b5e6-
96231b3b80d8
/// getPointerAddressSpace - Method to return the address space of the
/// pointer operand.
unsigned getPointerAddressSpace() const {
- return cast<PointerType>(getPointerOperandType())->getAddressSpace();
+ return getPointerOperandType()->getPointerAddressSpace();
}
unsigned getNumIndices() const { // Note: always non-negative
--- /dev/null
+; RUN: opt -mergefunc -disable-output < %s
+; This used to cause a crash when compairing the GEPs
+
+define void @foo(<2 x i64*>) {
+ %tmp = getelementptr <2 x i64*> %0, <2 x i64> <i64 0, i64 0>
+ ret void
+}
+
+define void @bar(<2 x i64*>) {
+ %tmp = getelementptr <2 x i64*> %0, <2 x i64> <i64 0, i64 0>
+ ret void
+}