File: inlineasm-16-fake16.ll

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,245,028 kB
  • sloc: cpp: 7,619,726; ansic: 1,434,018; asm: 1,058,748; python: 252,740; f90: 94,671; objc: 70,685; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,675; awk: 3,523; javascript: 2,409; xml: 892; fortran: 770
file content (79 lines) | stat: -rw-r--r-- 2,484 bytes parent folder | download | duplicates (3)
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
70
71
72
73
74
75
76
77
78
79
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=-real-true16 < %s | FileCheck -enable-var-scope -check-prefixes=GFX11 %s

define amdgpu_kernel void @s_input_output_i16() #0 {
; GFX11-LABEL: s_input_output_i16:
; GFX11:       ; %bb.0:
; GFX11-NEXT:    ;;#ASMSTART
; GFX11-NEXT:    s_mov_b32 s0, -1
; GFX11-NEXT:    ;;#ASMEND
; GFX11-NEXT:    s_and_b32 s0, s0, 0xffff
; GFX11-NEXT:    ;;#ASMSTART
; GFX11-NEXT:    ; use s0
; GFX11-NEXT:    ;;#ASMEND
; GFX11-NEXT:    s_endpgm
  %v = tail call i16 asm sideeffect "s_mov_b32 $0, -1", "=s"()
  tail call void asm sideeffect "; use $0", "s"(i16 %v) #0
  ret void
}

define amdgpu_kernel void @s_input_output_f16() #0 {
; GFX11-LABEL: s_input_output_f16:
; GFX11:       ; %bb.0:
; GFX11-NEXT:    ;;#ASMSTART
; GFX11-NEXT:    s_mov_b32 s0, -1
; GFX11-NEXT:    ;;#ASMEND
; GFX11-NEXT:    ;;#ASMSTART
; GFX11-NEXT:    ; use s0
; GFX11-NEXT:    ;;#ASMEND
; GFX11-NEXT:    s_endpgm
  %v = tail call half asm sideeffect "s_mov_b32 $0, -1", "=s"() #0
  tail call void asm sideeffect "; use $0", "s"(half %v)
  ret void
}

define amdgpu_kernel void @v_input_output_f16() #0 {
; GFX11-LABEL: v_input_output_f16:
; GFX11:       ; %bb.0:
; GFX11-NEXT:    ;;#ASMSTART
; GFX11-NEXT:    v_mov_b32 v0, -1
; GFX11-NEXT:    ;;#ASMEND
; GFX11-NEXT:    ;;#ASMSTART
; GFX11-NEXT:    ; use v0
; GFX11-NEXT:    ;;#ASMEND
; GFX11-NEXT:    s_endpgm
  %v = tail call half asm sideeffect "v_mov_b32 $0, -1", "=v"() #0
  tail call void asm sideeffect "; use $0", "v"(half %v)
  ret void
}

define amdgpu_kernel void @v_input_output_i16() #0 {
; GFX11-LABEL: v_input_output_i16:
; GFX11:       ; %bb.0:
; GFX11-NEXT:    ;;#ASMSTART
; GFX11-NEXT:    v_mov_b32 v0, -1
; GFX11-NEXT:    ;;#ASMEND
; GFX11-NEXT:    v_and_b32_e32 v0, 0xffff, v0
; GFX11-NEXT:    ;;#ASMSTART
; GFX11-NEXT:    ; use v0
; GFX11-NEXT:    ;;#ASMEND
; GFX11-NEXT:    s_endpgm
  %v = tail call i16 asm sideeffect "v_mov_b32 $0, -1", "=v"() #0
  tail call void asm sideeffect "; use $0", "v"(i16 %v)
  ret void
}

define amdgpu_kernel void @i16_imm_input_phys_vgpr() {
; GFX11-LABEL: i16_imm_input_phys_vgpr:
; GFX11:       ; %bb.0: ; %entry
; GFX11-NEXT:    v_mov_b32_e32 v0, 0xffff
; GFX11-NEXT:    ;;#ASMSTART
; GFX11-NEXT:    ; use v0
; GFX11-NEXT:    ;;#ASMEND
; GFX11-NEXT:    s_endpgm
entry:
  call void asm sideeffect "; use $0 ", "{v0}"(i16 65535)
  ret void
}

attributes #0 = { nounwind }