1 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s --check-prefix=PTX32
2 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s --check-prefix=PTX64
6 define i8 @ld_global_i8(i8 addrspace(0)* %ptr) {
7 ; PTX32: ld.u8 %r{{[0-9]+}}, [%r{{[0-9]+}}]
9 ; PTX64: ld.u8 %r{{[0-9]+}}, [%rd{{[0-9]+}}]
11 %a = load i8, i8 addrspace(0)* %ptr
16 define i16 @ld_global_i16(i16 addrspace(0)* %ptr) {
17 ; PTX32: ld.u16 %r{{[0-9]+}}, [%r{{[0-9]+}}]
19 ; PTX64: ld.u16 %r{{[0-9]+}}, [%rd{{[0-9]+}}]
21 %a = load i16, i16 addrspace(0)* %ptr
26 define i32 @ld_global_i32(i32 addrspace(0)* %ptr) {
27 ; PTX32: ld.u32 %r{{[0-9]+}}, [%r{{[0-9]+}}]
29 ; PTX64: ld.u32 %r{{[0-9]+}}, [%rd{{[0-9]+}}]
31 %a = load i32, i32 addrspace(0)* %ptr
36 define i64 @ld_global_i64(i64 addrspace(0)* %ptr) {
37 ; PTX32: ld.u64 %rd{{[0-9]+}}, [%r{{[0-9]+}}]
39 ; PTX64: ld.u64 %rd{{[0-9]+}}, [%rd{{[0-9]+}}]
41 %a = load i64, i64 addrspace(0)* %ptr
46 define float @ld_global_f32(float addrspace(0)* %ptr) {
47 ; PTX32: ld.f32 %f{{[0-9]+}}, [%r{{[0-9]+}}]
49 ; PTX64: ld.f32 %f{{[0-9]+}}, [%rd{{[0-9]+}}]
51 %a = load float, float addrspace(0)* %ptr
56 define double @ld_global_f64(double addrspace(0)* %ptr) {
57 ; PTX32: ld.f64 %fd{{[0-9]+}}, [%r{{[0-9]+}}]
59 ; PTX64: ld.f64 %fd{{[0-9]+}}, [%rd{{[0-9]+}}]
61 %a = load double, double addrspace(0)* %ptr