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