[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / CodeGen / AArch64 / GlobalISel / regbank-nearbyint.mir
blobe4b510c145dd726a7cbb46c44d76443e3260d317
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64-unknown-unknown -run-pass=regbankselect -mattr=+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s
4 ...
5 ---
6 name:            test_v4f16.nearbyint
7 alignment:       4
8 legalized:       true
9 tracksRegLiveness: true
10 machineFunctionInfo: {}
11 body:             |
12   bb.0:
13     liveins: $d0
15     ; CHECK-LABEL: name: test_v4f16.nearbyint
16     ; CHECK: liveins: $d0
17     ; CHECK: [[COPY:%[0-9]+]]:fpr(<4 x s16>) = COPY $d0
18     ; CHECK: [[FNEARBYINT:%[0-9]+]]:fpr(<4 x s16>) = G_FNEARBYINT [[COPY]]
19     ; CHECK: $d0 = COPY [[FNEARBYINT]](<4 x s16>)
20     ; CHECK: RET_ReallyLR implicit $d0
21     %0:_(<4 x s16>) = COPY $d0
22     %1:_(<4 x s16>) = G_FNEARBYINT %0
23     $d0 = COPY %1(<4 x s16>)
24     RET_ReallyLR implicit $d0
26 ...
27 ---
28 name:            test_v8f16.nearbyint
29 alignment:       4
30 legalized:       true
31 tracksRegLiveness: true
32 machineFunctionInfo: {}
33 body:             |
34   bb.0:
35     liveins: $q0
37     ; CHECK-LABEL: name: test_v8f16.nearbyint
38     ; CHECK: liveins: $q0
39     ; CHECK: [[COPY:%[0-9]+]]:fpr(<8 x s16>) = COPY $q0
40     ; CHECK: [[FNEARBYINT:%[0-9]+]]:fpr(<8 x s16>) = G_FNEARBYINT [[COPY]]
41     ; CHECK: $q0 = COPY [[FNEARBYINT]](<8 x s16>)
42     ; CHECK: RET_ReallyLR implicit $q0
43     %0:_(<8 x s16>) = COPY $q0
44     %1:_(<8 x s16>) = G_FNEARBYINT %0
45     $q0 = COPY %1(<8 x s16>)
46     RET_ReallyLR implicit $q0
48 ...
49 ---
50 name:            test_v2f32.nearbyint
51 alignment:       4
52 legalized:       true
53 tracksRegLiveness: true
54 machineFunctionInfo: {}
55 body:             |
56   bb.0:
57     liveins: $d0
59     ; CHECK-LABEL: name: test_v2f32.nearbyint
60     ; CHECK: liveins: $d0
61     ; CHECK: [[COPY:%[0-9]+]]:fpr(<2 x s32>) = COPY $d0
62     ; CHECK: [[FNEARBYINT:%[0-9]+]]:fpr(<2 x s32>) = G_FNEARBYINT [[COPY]]
63     ; CHECK: $d0 = COPY [[FNEARBYINT]](<2 x s32>)
64     ; CHECK: RET_ReallyLR implicit $d0
65     %0:_(<2 x s32>) = COPY $d0
66     %1:_(<2 x s32>) = G_FNEARBYINT %0
67     $d0 = COPY %1(<2 x s32>)
68     RET_ReallyLR implicit $d0
70 ...
71 ---
72 name:            test_v2f64.nearbyint
73 alignment:       4
74 legalized:       true
75 tracksRegLiveness: true
76 machineFunctionInfo: {}
77 body:             |
78   bb.0:
79     liveins: $q0
81     ; CHECK-LABEL: name: test_v2f64.nearbyint
82     ; CHECK: liveins: $q0
83     ; CHECK: [[COPY:%[0-9]+]]:fpr(<2 x s64>) = COPY $q0
84     ; CHECK: [[FNEARBYINT:%[0-9]+]]:fpr(<2 x s64>) = G_FNEARBYINT [[COPY]]
85     ; CHECK: $q0 = COPY [[FNEARBYINT]](<2 x s64>)
86     ; CHECK: RET_ReallyLR implicit $q0
87     %0:_(<2 x s64>) = COPY $q0
88     %1:_(<2 x s64>) = G_FNEARBYINT %0
89     $q0 = COPY %1(<2 x s64>)
90     RET_ReallyLR implicit $q0
92 ...
93 ---
94 name:            test_f32.nearbyint
95 alignment:       4
96 legalized:       true
97 tracksRegLiveness: true
98 machineFunctionInfo: {}
99 body:             |
100   bb.0:
101     liveins: $s0
103     ; CHECK-LABEL: name: test_f32.nearbyint
104     ; CHECK: liveins: $s0
105     ; CHECK: [[COPY:%[0-9]+]]:fpr(s32) = COPY $s0
106     ; CHECK: [[FNEARBYINT:%[0-9]+]]:fpr(s32) = G_FNEARBYINT [[COPY]]
107     ; CHECK: $s0 = COPY [[FNEARBYINT]](s32)
108     ; CHECK: RET_ReallyLR implicit $s0
109     %0:_(s32) = COPY $s0
110     %1:_(s32) = G_FNEARBYINT %0
111     $s0 = COPY %1(s32)
112     RET_ReallyLR implicit $s0
116 name:            test_f64.nearbyint
117 alignment:       4
118 legalized:       true
119 tracksRegLiveness: true
120 machineFunctionInfo: {}
121 body:             |
122   bb.0:
123     liveins: $d0
125     ; CHECK-LABEL: name: test_f64.nearbyint
126     ; CHECK: liveins: $d0
127     ; CHECK: [[COPY:%[0-9]+]]:fpr(s64) = COPY $d0
128     ; CHECK: [[FNEARBYINT:%[0-9]+]]:fpr(s64) = G_FNEARBYINT [[COPY]]
129     ; CHECK: $d0 = COPY [[FNEARBYINT]](s64)
130     ; CHECK: RET_ReallyLR implicit $d0
131     %0:_(s64) = COPY $d0
132     %1:_(s64) = G_FNEARBYINT %0
133     $d0 = COPY %1(s64)
134     RET_ReallyLR implicit $d0
138 name:            test_f16.nearbyint
139 alignment:       4
140 legalized:       true
141 tracksRegLiveness: true
142 machineFunctionInfo: {}
143 body:             |
144   bb.0:
145     liveins: $h0
147     ; CHECK-LABEL: name: test_f16.nearbyint
148     ; CHECK: liveins: $h0
149     ; CHECK: [[COPY:%[0-9]+]]:fpr(s16) = COPY $h0
150     ; CHECK: [[FNEARBYINT:%[0-9]+]]:fpr(s16) = G_FNEARBYINT [[COPY]]
151     ; CHECK: $h0 = COPY [[FNEARBYINT]](s16)
152     ; CHECK: RET_ReallyLR implicit $h0
153     %0:_(s16) = COPY $h0
154     %1:_(s16) = G_FNEARBYINT %0
155     $h0 = COPY %1(s16)
156     RET_ReallyLR implicit $h0