File: legalize-fmaximum.mir

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (151 lines) | stat: -rw-r--r-- 5,236 bytes parent folder | download | duplicates (10)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=legalizer -mattr=+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=FP16
# RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=NO-FP16
...
---
name:            s16_legal_with_full_fp16
alignment:       4
body:             |
  bb.0:
    liveins: $h0, $h1
    ; FP16-LABEL: name: s16_legal_with_full_fp16
    ; FP16: liveins: $h0, $h1
    ; FP16-NEXT: {{  $}}
    ; FP16-NEXT: %a:_(s16) = COPY $h0
    ; FP16-NEXT: %b:_(s16) = COPY $h1
    ; FP16-NEXT: %legalize_me:_(s16) = G_FMAXIMUM %a, %b
    ; FP16-NEXT: $h0 = COPY %legalize_me(s16)
    ; FP16-NEXT: RET_ReallyLR implicit $h0
    ; NO-FP16-LABEL: name: s16_legal_with_full_fp16
    ; NO-FP16: liveins: $h0, $h1
    ; NO-FP16-NEXT: {{  $}}
    ; NO-FP16-NEXT: %a:_(s16) = COPY $h0
    ; NO-FP16-NEXT: %b:_(s16) = COPY $h1
    ; NO-FP16-NEXT: [[FPEXT:%[0-9]+]]:_(s32) = G_FPEXT %a(s16)
    ; NO-FP16-NEXT: [[FPEXT1:%[0-9]+]]:_(s32) = G_FPEXT %b(s16)
    ; NO-FP16-NEXT: [[FMAXIMUM:%[0-9]+]]:_(s32) = G_FMAXIMUM [[FPEXT]], [[FPEXT1]]
    ; NO-FP16-NEXT: %legalize_me:_(s16) = G_FPTRUNC [[FMAXIMUM]](s32)
    ; NO-FP16-NEXT: $h0 = COPY %legalize_me(s16)
    ; NO-FP16-NEXT: RET_ReallyLR implicit $h0
    %a:_(s16) = COPY $h0
    %b:_(s16) = COPY $h1
    %legalize_me:_(s16) = G_FMAXIMUM %a, %b
    $h0 = COPY %legalize_me(s16)
    RET_ReallyLR implicit $h0

...
---
name:            s32_legal
alignment:       4
body:             |
  bb.0:
    liveins: $s0, $s1
    ; FP16-LABEL: name: s32_legal
    ; FP16: liveins: $s0, $s1
    ; FP16-NEXT: {{  $}}
    ; FP16-NEXT: %a:_(s32) = COPY $s0
    ; FP16-NEXT: %b:_(s32) = COPY $s1
    ; FP16-NEXT: %legalize_me:_(s32) = G_FMAXIMUM %a, %b
    ; FP16-NEXT: $s0 = COPY %legalize_me(s32)
    ; FP16-NEXT: RET_ReallyLR implicit $s0
    ; NO-FP16-LABEL: name: s32_legal
    ; NO-FP16: liveins: $s0, $s1
    ; NO-FP16-NEXT: {{  $}}
    ; NO-FP16-NEXT: %a:_(s32) = COPY $s0
    ; NO-FP16-NEXT: %b:_(s32) = COPY $s1
    ; NO-FP16-NEXT: %legalize_me:_(s32) = G_FMAXIMUM %a, %b
    ; NO-FP16-NEXT: $s0 = COPY %legalize_me(s32)
    ; NO-FP16-NEXT: RET_ReallyLR implicit $s0
    %a:_(s32) = COPY $s0
    %b:_(s32) = COPY $s1
    %legalize_me:_(s32) = G_FMAXIMUM %a, %b
    $s0 = COPY %legalize_me(s32)
    RET_ReallyLR implicit $s0

...
---
name:            s64_legal
alignment:       4
body:             |
  bb.0:
    liveins: $d0, $d1
    ; FP16-LABEL: name: s64_legal
    ; FP16: liveins: $d0, $d1
    ; FP16-NEXT: {{  $}}
    ; FP16-NEXT: %a:_(s64) = COPY $d0
    ; FP16-NEXT: %b:_(s64) = COPY $d1
    ; FP16-NEXT: %legalize_me:_(s64) = G_FMAXIMUM %a, %b
    ; FP16-NEXT: $d0 = COPY %legalize_me(s64)
    ; FP16-NEXT: RET_ReallyLR implicit $d0
    ; NO-FP16-LABEL: name: s64_legal
    ; NO-FP16: liveins: $d0, $d1
    ; NO-FP16-NEXT: {{  $}}
    ; NO-FP16-NEXT: %a:_(s64) = COPY $d0
    ; NO-FP16-NEXT: %b:_(s64) = COPY $d1
    ; NO-FP16-NEXT: %legalize_me:_(s64) = G_FMAXIMUM %a, %b
    ; NO-FP16-NEXT: $d0 = COPY %legalize_me(s64)
    ; NO-FP16-NEXT: RET_ReallyLR implicit $d0
    %a:_(s64) = COPY $d0
    %b:_(s64) = COPY $d1
    %legalize_me:_(s64) = G_FMAXIMUM %a, %b
    $d0 = COPY %legalize_me(s64)
    RET_ReallyLR implicit $d0
...
---
name:            v2s32
alignment:       4
body:             |
  bb.0:
    liveins: $d0, $d1
    ; FP16-LABEL: name: v2s32
    ; FP16: liveins: $d0, $d1
    ; FP16-NEXT: {{  $}}
    ; FP16-NEXT: %a:_(<2 x s32>) = COPY $d0
    ; FP16-NEXT: %b:_(<2 x s32>) = COPY $d1
    ; FP16-NEXT: %maximum:_(<2 x s32>) = G_FMAXIMUM %a, %b
    ; FP16-NEXT: $d0 = COPY %maximum(<2 x s32>)
    ; FP16-NEXT: RET_ReallyLR implicit $d0
    ; NO-FP16-LABEL: name: v2s32
    ; NO-FP16: liveins: $d0, $d1
    ; NO-FP16-NEXT: {{  $}}
    ; NO-FP16-NEXT: %a:_(<2 x s32>) = COPY $d0
    ; NO-FP16-NEXT: %b:_(<2 x s32>) = COPY $d1
    ; NO-FP16-NEXT: %maximum:_(<2 x s32>) = G_FMAXIMUM %a, %b
    ; NO-FP16-NEXT: $d0 = COPY %maximum(<2 x s32>)
    ; NO-FP16-NEXT: RET_ReallyLR implicit $d0
    %a:_(<2 x s32>) = COPY $d0
    %b:_(<2 x s32>) = COPY $d1
    %maximum:_(<2 x s32>) = G_FMAXIMUM %a, %b
    $d0 = COPY %maximum(<2 x s32>)
    RET_ReallyLR implicit $d0

...
---
name:            v4s32
alignment:       4
body:             |
  bb.0:
    liveins: $q0, $q1
    ; FP16-LABEL: name: v4s32
    ; FP16: liveins: $q0, $q1
    ; FP16-NEXT: {{  $}}
    ; FP16-NEXT: %a:_(<4 x s32>) = COPY $q0
    ; FP16-NEXT: %b:_(<4 x s32>) = COPY $q1
    ; FP16-NEXT: %maximum:_(<4 x s32>) = G_FMAXIMUM %a, %b
    ; FP16-NEXT: $q0 = COPY %maximum(<4 x s32>)
    ; FP16-NEXT: RET_ReallyLR implicit $q0
    ; NO-FP16-LABEL: name: v4s32
    ; NO-FP16: liveins: $q0, $q1
    ; NO-FP16-NEXT: {{  $}}
    ; NO-FP16-NEXT: %a:_(<4 x s32>) = COPY $q0
    ; NO-FP16-NEXT: %b:_(<4 x s32>) = COPY $q1
    ; NO-FP16-NEXT: %maximum:_(<4 x s32>) = G_FMAXIMUM %a, %b
    ; NO-FP16-NEXT: $q0 = COPY %maximum(<4 x s32>)
    ; NO-FP16-NEXT: RET_ReallyLR implicit $q0
    %a:_(<4 x s32>) = COPY $q0
    %b:_(<4 x s32>) = COPY $q1
    %maximum:_(<4 x s32>) = G_FMAXIMUM %a, %b
    $q0 = COPY %maximum(<4 x s32>)
    RET_ReallyLR implicit $q0

...