mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
Fix crash when looking up the addrspace of GEPs with vector types
Patch by Björn Steinbrink git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216930 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f93099eb1c
commit
0565503d5d
@ -402,7 +402,7 @@ public:
|
||||
/// 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
|
||||
|
12
test/Transforms/MergeFunc/vector-GEP-crash.ll
Normal file
12
test/Transforms/MergeFunc/vector-GEP-crash.ll
Normal file
@ -0,0 +1,12 @@
|
||||
; 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user