1 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_35 -verify-machineinstrs | FileCheck %s
2 ; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcpu=sm_35 | %ptxas-verify %}
4 ; Check load from constant global variables. These loads should be
5 ; ld.global.nc (aka ldg).
7 @gv_float = external constant float
8 @gv_float2 = external constant <2 x float>
9 @gv_float4 = external constant <4 x float>
11 ; CHECK-LABEL: test_gv_float()
12 define float @test_gv_float() {
13 ; CHECK: ld.global.nc.f32
14 %v = load float, ptr @gv_float
18 ; CHECK-LABEL: test_gv_float2()
19 define <2 x float> @test_gv_float2() {
20 ; CHECK: ld.global.nc.v2.f32
21 %v = load <2 x float>, ptr @gv_float2
25 ; CHECK-LABEL: test_gv_float4()
26 define <4 x float> @test_gv_float4() {
27 ; CHECK: ld.global.nc.v4.f32
28 %v = load <4 x float>, ptr @gv_float4