mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-07 01:54:50 +00:00
space info. We crash with an assert in this case. This change checks that the address space of the bitcasted pointer is the same as the gep ptr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128884 91177308-0d34-0410-b5e6-96231b3b80d8
17 lines
541 B
LLVM
17 lines
541 B
LLVM
; RUN: opt < %s -instcombine -S
|
|
|
|
%myStruct = type { float, [3 x float], [4 x float], i32 }
|
|
|
|
; make sure that we are not crashing when creating an illegal type
|
|
define void @func(%myStruct addrspace(1)* nocapture %p) nounwind {
|
|
ST:
|
|
%A = getelementptr inbounds %myStruct addrspace(1)* %p, i64 0
|
|
%B = bitcast %myStruct addrspace(1)* %A to %myStruct*
|
|
%C = getelementptr inbounds %myStruct* %B, i32 0, i32 1
|
|
%D = getelementptr inbounds [3 x float]* %C, i32 0, i32 2
|
|
%E = load float* %D, align 4
|
|
%F = fsub float %E, undef
|
|
ret void
|
|
}
|
|
|