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