Revert rGe6ccb57bb3f6b761f2310e97fd6ca99eff42f73e "[SLP] Add cost model for `llvm...
[llvm-project.git] / llvm / test / CodeGen / AMDGPU / replace-lds-by-ptr-ignore-inline-asm-call.ll
blob1d04b9d4a151d2472aad1d9ec6abb0e1543a24f9
1 ; RUN: opt -S -mtriple=amdgcn--  -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
3 ; DESCRIPTION:
5 ; We do not know what to do with inline asm call, we ignore it, hence pointer replacement for
6 ; @used_only_within_func does not take place.
9 ; CHECK: @used_only_within_func = addrspace(3) global [4 x i32] undef, align 4
10 @used_only_within_func = addrspace(3) global [4 x i32] undef, align 4
12 ; CHECK-NOT: @used_only_within_func.ptr
14 define void @f0(i32 %x) {
15 ; CHECK-LABEL: entry:
16 ; CHECK:   store i32 %x, i32* inttoptr (i64 add (i64 ptrtoint (i32* addrspacecast (i32 addrspace(3)* getelementptr inbounds ([4 x i32], [4 x i32] addrspace(3)* @used_only_within_func, i32 0, i32 0) to i32*) to i64), i64 ptrtoint (i32* addrspacecast (i32 addrspace(3)* getelementptr inbounds ([4 x i32], [4 x i32] addrspace(3)* @used_only_within_func, i32 0, i32 0) to i32*) to i64)) to i32*), align 4
17 ; CHECK:   ret void
18 entry:
19   store i32 %x, i32* inttoptr (i64 add (i64 ptrtoint (i32* addrspacecast (i32 addrspace(3)* bitcast ([4 x i32] addrspace(3)* @used_only_within_func to i32 addrspace(3)*) to i32*) to i64), i64 ptrtoint (i32* addrspacecast (i32 addrspace(3)* bitcast ([4 x i32] addrspace(3)* @used_only_within_func to i32 addrspace(3)*) to i32*) to i64)) to i32*), align 4
20   ret void
23 define amdgpu_kernel void @k0() {
24 ; CHECK-LABEL: entry:
25 ; CHECK:   call i32 asm "s_mov_b32 $0, 0", "=s"()
26 ; CHECK:   ret void
27 entry:
28   call i32 asm "s_mov_b32 $0, 0", "=s"()
29   ret void