Home | History | Annotate | Download | only in NVPTX
      1 ; RUN: llc < %s -march=nvptx -mcpu=sm_35 | FileCheck %s
      2 
      3 ; Check load from constant global variables.  These loads should be
      4 ; ld.global.nc (aka ldg).
      5 
      6 @gv_float = external constant float
      7 @gv_float2 = external constant <2 x float>
      8 @gv_float4 = external constant <4 x float>
      9 
     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
     14   ret float %v
     15 }
     16 
     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
     21   ret <2 x float> %v
     22 }
     23 
     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
     28   ret <4 x float> %v
     29 }
     30