1 ; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu %s -o - | FileCheck %s
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
10 ; Check that fairly complicated addrspace cast and operations succeed without error.
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