1 ; RUN: llc < %s -march=nvptx -mcpu=sm_35 | FileCheck %s
3 ; Check load from constant global variables. These loads should be
4 ; ld.global.nc (aka ldg).
6 @gv_float = external constant float
7 @gv_float2 = external constant <2 x float>
8 @gv_float4 = external constant <4 x float>
10 ; CHECK-LABEL: test_gv_float()
11 define float @test_gv_float() {
12 ; CHECK: ld.global.nc.f32
13 %v = load float, float* @gv_float
17 ; CHECK-LABEL: test_gv_float2()
18 define <2 x float> @test_gv_float2() {
19 ; CHECK: ld.global.nc.v2.f32
20 %v = load <2 x float>, <2 x float>* @gv_float2
24 ; CHECK-LABEL: test_gv_float4()
25 define <4 x float> @test_gv_float4() {
26 ; CHECK: ld.global.nc.v4.f32
27 %v = load <4 x float>, <4 x float>* @gv_float4