1 ; RUN: llc < %s | FileCheck %s
2 ; RUN: %if ptxas %{ llc < %s | %ptxas-verify %}
4 target triple = "nvptx64-nvidia-cuda"
7 ; CHECK: ld.global.v2.f32
8 ; CHECK: ld.global.v2.f32
9 ; CHECK: st.global.v2.f32
10 ; CHECK: st.global.v2.f32
11 define void @test1(ptr addrspace(1) noalias align 8 %in, ptr addrspace(1) noalias align 8 %out) {
12 %in.1 = getelementptr float, ptr addrspace(1) %in, i32 1
13 %in.2 = getelementptr float, ptr addrspace(1) %in, i32 2
14 %in.3 = getelementptr float, ptr addrspace(1) %in, i32 3
15 %v0 = load float, ptr addrspace(1) %in, align 8
16 %v1 = load float, ptr addrspace(1) %in.1, align 4
17 %v2 = load float, ptr addrspace(1) %in.2, align 8
18 %v3 = load float, ptr addrspace(1) %in.3, align 4
19 %sum0 = fadd float %v0, %v1
20 %sum1 = fadd float %v1, %v2
21 %sum2 = fadd float %v3, %v1
22 %sum3 = fadd float %v2, %v3
23 %out.1 = getelementptr float, ptr addrspace(1) %out, i32 1
24 %out.2 = getelementptr float, ptr addrspace(1) %out, i32 2
25 %out.3 = getelementptr float, ptr addrspace(1) %out, i32 3
26 store float %sum0, ptr addrspace(1) %out, align 8
27 store float %sum1, ptr addrspace(1) %out.1, align 4
28 store float %sum2, ptr addrspace(1) %out.2, align 8
29 store float %sum3, ptr addrspace(1) %out.3, align 4