File: st-generic.ll

package info (click to toggle)
llvm-toolchain-3.4 1%3A3.4.2-13
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 253,236 kB
  • ctags: 276,203
  • sloc: cpp: 1,665,580; ansic: 298,647; asm: 206,157; objc: 84,350; python: 73,119; sh: 23,466; perl: 5,679; makefile: 5,542; ml: 5,250; pascal: 2,467; lisp: 1,420; xml: 679; cs: 236; csh: 117
file content (69 lines) | stat: -rw-r--r-- 1,611 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s --check-prefix=PTX32
; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s --check-prefix=PTX64


;; i8

define void @st_global_i8(i8 addrspace(0)* %ptr, i8 %a) {
; PTX32: st.u8 [%r{{[0-9]+}}], %rs{{[0-9]+}}
; PTX32: ret
; PTX64: st.u8 [%rl{{[0-9]+}}], %rs{{[0-9]+}}
; PTX64: ret
  store i8 %a, i8 addrspace(0)* %ptr
  ret void
}

;; i16

define void @st_global_i16(i16 addrspace(0)* %ptr, i16 %a) {
; PTX32: st.u16 [%r{{[0-9]+}}], %rs{{[0-9]+}}
; PTX32: ret
; PTX64: st.u16 [%rl{{[0-9]+}}], %rs{{[0-9]+}}
; PTX64: ret
  store i16 %a, i16 addrspace(0)* %ptr
  ret void
}

;; i32

define void @st_global_i32(i32 addrspace(0)* %ptr, i32 %a) {
; PTX32: st.u32 [%r{{[0-9]+}}], %r{{[0-9]+}}
; PTX32: ret
; PTX64: st.u32 [%rl{{[0-9]+}}], %r{{[0-9]+}}
; PTX64: ret
  store i32 %a, i32 addrspace(0)* %ptr
  ret void
}

;; i64

define void @st_global_i64(i64 addrspace(0)* %ptr, i64 %a) {
; PTX32: st.u64 [%r{{[0-9]+}}], %rl{{[0-9]+}}
; PTX32: ret
; PTX64: st.u64 [%rl{{[0-9]+}}], %rl{{[0-9]+}}
; PTX64: ret
  store i64 %a, i64 addrspace(0)* %ptr
  ret void
}

;; f32

define void @st_global_f32(float addrspace(0)* %ptr, float %a) {
; PTX32: st.f32 [%r{{[0-9]+}}], %f{{[0-9]+}}
; PTX32: ret
; PTX64: st.f32 [%rl{{[0-9]+}}], %f{{[0-9]+}}
; PTX64: ret
  store float %a, float addrspace(0)* %ptr
  ret void
}

;; f64

define void @st_global_f64(double addrspace(0)* %ptr, double %a) {
; PTX32: st.f64 [%r{{[0-9]+}}], %fl{{[0-9]+}}
; PTX32: ret
; PTX64: st.f64 [%rl{{[0-9]+}}], %fl{{[0-9]+}}
; PTX64: ret
  store double %a, double addrspace(0)* %ptr
  ret void
}