1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc %s -verify-machineinstrs -mtriple=aarch64-unknown-unknown -run-pass=legalizer -simplify-mir -aarch64-neon-syntax=apple -mattr=-fullfp16 -o - | FileCheck %s --check-prefix=NO-FP16
3 # RUN: llc %s -verify-machineinstrs -mtriple=aarch64-unknown-unknown -run-pass=legalizer -simplify-mir -aarch64-neon-syntax=apple -mattr=+fullfp16 -o - | FileCheck %s --check-prefix=FP16
7 name: test_f16.intrinsic_trunc
9 tracksRegLiveness: true
13 ; NO-FP16-LABEL: name: test_f16.intrinsic_trunc
14 ; NO-FP16: liveins: $h0
15 ; NO-FP16-NEXT: {{ $}}
16 ; NO-FP16-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0
17 ; NO-FP16-NEXT: [[FPEXT:%[0-9]+]]:_(s32) = G_FPEXT [[COPY]](s16)
18 ; NO-FP16-NEXT: [[INTRINSIC_TRUNC:%[0-9]+]]:_(s32) = G_INTRINSIC_TRUNC [[FPEXT]]
19 ; NO-FP16-NEXT: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[INTRINSIC_TRUNC]](s32)
20 ; NO-FP16-NEXT: $h0 = COPY [[FPTRUNC]](s16)
21 ; NO-FP16-NEXT: RET_ReallyLR implicit $h0
23 ; FP16-LABEL: name: test_f16.intrinsic_trunc
26 ; FP16-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0
27 ; FP16-NEXT: [[INTRINSIC_TRUNC:%[0-9]+]]:_(s16) = G_INTRINSIC_TRUNC [[COPY]]
28 ; FP16-NEXT: $h0 = COPY [[INTRINSIC_TRUNC]](s16)
29 ; FP16-NEXT: RET_ReallyLR implicit $h0
31 %1:_(s16) = G_INTRINSIC_TRUNC %0
33 RET_ReallyLR implicit $h0
37 name: test_v4f16.intrinsic_trunc
39 tracksRegLiveness: true
40 machineFunctionInfo: {}
45 ; NO-FP16-LABEL: name: test_v4f16.intrinsic_trunc
46 ; NO-FP16: liveins: $d0
47 ; NO-FP16-NEXT: {{ $}}
48 ; NO-FP16-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0
49 ; NO-FP16-NEXT: [[FPEXT:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[COPY]](<4 x s16>)
50 ; NO-FP16-NEXT: [[INTRINSIC_TRUNC:%[0-9]+]]:_(<4 x s32>) = G_INTRINSIC_TRUNC [[FPEXT]]
51 ; NO-FP16-NEXT: [[FPTRUNC:%[0-9]+]]:_(<4 x s16>) = G_FPTRUNC [[INTRINSIC_TRUNC]](<4 x s32>)
52 ; NO-FP16-NEXT: $d0 = COPY [[FPTRUNC]](<4 x s16>)
53 ; NO-FP16-NEXT: RET_ReallyLR implicit $d0
55 ; FP16-LABEL: name: test_v4f16.intrinsic_trunc
58 ; FP16-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0
59 ; FP16-NEXT: [[INTRINSIC_TRUNC:%[0-9]+]]:_(<4 x s16>) = G_INTRINSIC_TRUNC [[COPY]]
60 ; FP16-NEXT: $d0 = COPY [[INTRINSIC_TRUNC]](<4 x s16>)
61 ; FP16-NEXT: RET_ReallyLR implicit $d0
62 %0:_(<4 x s16>) = COPY $d0
63 %1:_(<4 x s16>) = G_INTRINSIC_TRUNC %0
64 $d0 = COPY %1(<4 x s16>)
65 RET_ReallyLR implicit $d0
69 name: test_v8f16.intrinsic_trunc
71 tracksRegLiveness: true
72 machineFunctionInfo: {}
77 ; NO-FP16-LABEL: name: test_v8f16.intrinsic_trunc
78 ; NO-FP16: liveins: $q0
79 ; NO-FP16-NEXT: {{ $}}
80 ; NO-FP16-NEXT: [[COPY:%[0-9]+]]:_(<8 x s16>) = COPY $q0
81 ; NO-FP16-NEXT: [[UV:%[0-9]+]]:_(<4 x s16>), [[UV1:%[0-9]+]]:_(<4 x s16>) = G_UNMERGE_VALUES [[COPY]](<8 x s16>)
82 ; NO-FP16-NEXT: [[FPEXT:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[UV]](<4 x s16>)
83 ; NO-FP16-NEXT: [[FPEXT1:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[UV1]](<4 x s16>)
84 ; NO-FP16-NEXT: [[INTRINSIC_TRUNC:%[0-9]+]]:_(<4 x s32>) = G_INTRINSIC_TRUNC [[FPEXT]]
85 ; NO-FP16-NEXT: [[INTRINSIC_TRUNC1:%[0-9]+]]:_(<4 x s32>) = G_INTRINSIC_TRUNC [[FPEXT1]]
86 ; NO-FP16-NEXT: [[FPTRUNC:%[0-9]+]]:_(<4 x s16>) = G_FPTRUNC [[INTRINSIC_TRUNC]](<4 x s32>)
87 ; NO-FP16-NEXT: [[FPTRUNC1:%[0-9]+]]:_(<4 x s16>) = G_FPTRUNC [[INTRINSIC_TRUNC1]](<4 x s32>)
88 ; NO-FP16-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<8 x s16>) = G_CONCAT_VECTORS [[FPTRUNC]](<4 x s16>), [[FPTRUNC1]](<4 x s16>)
89 ; NO-FP16-NEXT: $q0 = COPY [[CONCAT_VECTORS]](<8 x s16>)
90 ; NO-FP16-NEXT: RET_ReallyLR implicit $q0
92 ; FP16-LABEL: name: test_v8f16.intrinsic_trunc
95 ; FP16-NEXT: [[COPY:%[0-9]+]]:_(<8 x s16>) = COPY $q0
96 ; FP16-NEXT: [[INTRINSIC_TRUNC:%[0-9]+]]:_(<8 x s16>) = G_INTRINSIC_TRUNC [[COPY]]
97 ; FP16-NEXT: $q0 = COPY [[INTRINSIC_TRUNC]](<8 x s16>)
98 ; FP16-NEXT: RET_ReallyLR implicit $q0
99 %0:_(<8 x s16>) = COPY $q0
100 %1:_(<8 x s16>) = G_INTRINSIC_TRUNC %0
101 $q0 = COPY %1(<8 x s16>)
102 RET_ReallyLR implicit $q0
106 name: test_v2f32.intrinsic_trunc
108 tracksRegLiveness: true
109 machineFunctionInfo: {}
114 ; NO-FP16-LABEL: name: test_v2f32.intrinsic_trunc
115 ; NO-FP16: liveins: $d0
116 ; NO-FP16-NEXT: {{ $}}
117 ; NO-FP16-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
118 ; NO-FP16-NEXT: [[INTRINSIC_TRUNC:%[0-9]+]]:_(<2 x s32>) = G_INTRINSIC_TRUNC [[COPY]]
119 ; NO-FP16-NEXT: $d0 = COPY [[INTRINSIC_TRUNC]](<2 x s32>)
120 ; NO-FP16-NEXT: RET_ReallyLR implicit $d0
122 ; FP16-LABEL: name: test_v2f32.intrinsic_trunc
125 ; FP16-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d0
126 ; FP16-NEXT: [[INTRINSIC_TRUNC:%[0-9]+]]:_(<2 x s32>) = G_INTRINSIC_TRUNC [[COPY]]
127 ; FP16-NEXT: $d0 = COPY [[INTRINSIC_TRUNC]](<2 x s32>)
128 ; FP16-NEXT: RET_ReallyLR implicit $d0
129 %0:_(<2 x s32>) = COPY $d0
130 %1:_(<2 x s32>) = G_INTRINSIC_TRUNC %0
131 $d0 = COPY %1(<2 x s32>)
132 RET_ReallyLR implicit $d0
136 name: test_v4f32.intrinsic_trunc
138 tracksRegLiveness: true
139 machineFunctionInfo: {}
144 ; NO-FP16-LABEL: name: test_v4f32.intrinsic_trunc
145 ; NO-FP16: liveins: $q0
146 ; NO-FP16-NEXT: {{ $}}
147 ; NO-FP16-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
148 ; NO-FP16-NEXT: [[INTRINSIC_TRUNC:%[0-9]+]]:_(<4 x s32>) = G_INTRINSIC_TRUNC [[COPY]]
149 ; NO-FP16-NEXT: $q0 = COPY [[INTRINSIC_TRUNC]](<4 x s32>)
150 ; NO-FP16-NEXT: RET_ReallyLR implicit $q0
152 ; FP16-LABEL: name: test_v4f32.intrinsic_trunc
155 ; FP16-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
156 ; FP16-NEXT: [[INTRINSIC_TRUNC:%[0-9]+]]:_(<4 x s32>) = G_INTRINSIC_TRUNC [[COPY]]
157 ; FP16-NEXT: $q0 = COPY [[INTRINSIC_TRUNC]](<4 x s32>)
158 ; FP16-NEXT: RET_ReallyLR implicit $q0
159 %0:_(<4 x s32>) = COPY $q0
160 %1:_(<4 x s32>) = G_INTRINSIC_TRUNC %0
161 $q0 = COPY %1(<4 x s32>)
162 RET_ReallyLR implicit $q0
166 name: test_v2f64.intrinsic_trunc
168 tracksRegLiveness: true
169 machineFunctionInfo: {}
174 ; NO-FP16-LABEL: name: test_v2f64.intrinsic_trunc
175 ; NO-FP16: liveins: $q0
176 ; NO-FP16-NEXT: {{ $}}
177 ; NO-FP16-NEXT: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
178 ; NO-FP16-NEXT: [[INTRINSIC_TRUNC:%[0-9]+]]:_(<2 x s64>) = G_INTRINSIC_TRUNC [[COPY]]
179 ; NO-FP16-NEXT: $q0 = COPY [[INTRINSIC_TRUNC]](<2 x s64>)
180 ; NO-FP16-NEXT: RET_ReallyLR implicit $q0
182 ; FP16-LABEL: name: test_v2f64.intrinsic_trunc
185 ; FP16-NEXT: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
186 ; FP16-NEXT: [[INTRINSIC_TRUNC:%[0-9]+]]:_(<2 x s64>) = G_INTRINSIC_TRUNC [[COPY]]
187 ; FP16-NEXT: $q0 = COPY [[INTRINSIC_TRUNC]](<2 x s64>)
188 ; FP16-NEXT: RET_ReallyLR implicit $q0
189 %0:_(<2 x s64>) = COPY $q0
190 %1:_(<2 x s64>) = G_INTRINSIC_TRUNC %0
191 $q0 = COPY %1(<2 x s64>)
192 RET_ReallyLR implicit $q0