Debian Codegraph @

llvm/test/CodeGen/PowerPC/addrspacecast.ll

raw
1 ; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu %s -o - | FileCheck %s
2
3 ; Check that codegen for an addrspace cast succeeds without error.
4 define <4 x ptr addrspace(1)> @f (<4 x ptr> %x) {
5 %1 = addrspacecast <4 x ptr> %x to <4 x ptr addrspace(1)>
6 ret <4 x ptr addrspace(1)> %1
7 ; CHECK-LABEL: @f
8 }
9
10 ; Check that fairly complicated addrspace cast and operations succeed without error.
11 %struct = type opaque
12 define void @g (ptr %x) {
13 %1 = load ptr addrspace(10), ptr %x
14 %2 = addrspacecast ptr addrspace(10) %1 to ptr addrspace(11)
15 %3 = getelementptr i8, ptr addrspace(11) %2, i64 16
16 %4 = load ptr addrspace(10), ptr addrspace(11) %3
17 store ptr addrspace(10) %4, ptr undef
18 ret void
19 ; CHECK-LABEL: @g
20 }