Thomas Lively | ebd4c90 | 2018-09-12 17:56:00 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -disable-wasm-fallthrough-return-opt -wasm-keep-registers -wasm-disable-explicit-locals -wasm-enable-unimplemented-simd -mattr=+simd128,+sign-ext --show-mc-encoding | FileCheck %s --check-prefixes CHECK,SIMD128 |
| 2 | ; RUN: llc < %s -disable-wasm-fallthrough-return-opt -wasm-keep-registers -wasm-disable-explicit-locals -mattr=+simd128,+sign-ext --show-mc-encoding | FileCheck %s --check-prefixes CHECK,SIMD128-VM |
| 3 | ; RUN: llc < %s -disable-wasm-fallthrough-return-opt -wasm-keep-registers -wasm-disable-explicit-locals -mattr=-simd128,+sign-ext --show-mc-encoding | FileCheck %s --check-prefixes CHECK,NO-SIMD128 |
| 4 | |
| 5 | ; Test SIMD comparison operators |
| 6 | |
| 7 | target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" |
| 8 | target triple = "wasm32-unknown-unknown" |
| 9 | |
| 10 | ; CHECK-LABEL: compare_eq_v16i8: |
| 11 | ; NO-SIMD128-NOT: i8x16 |
| 12 | ; SIMD128: .param v128, v128{{$}} |
| 13 | ; SIMD128: .result v128{{$}} |
| 14 | ; SIMD128: i8x16.eq $push0=, $0, $1 # encoding: [0xfd,0x48]{{$}} |
| 15 | ; SIMD128: return $pop0 # |
| 16 | define <16 x i1> @compare_eq_v16i8 (<16 x i8> %x, <16 x i8> %y) { |
| 17 | %res = icmp eq <16 x i8> %x, %y |
| 18 | ret <16 x i1> %res |
| 19 | } |
| 20 | |
| 21 | ; CHECK-LABEL: compare_ne_v16i8: |
| 22 | ; NO-SIMD128-NOT: i8x16 |
| 23 | ; SIMD128: .param v128, v128{{$}} |
| 24 | ; SIMD128: .result v128{{$}} |
| 25 | ; SIMD128: i8x16.ne $push0=, $0, $1 # encoding: [0xfd,0x4d]{{$}} |
| 26 | ; SIMD128: return $pop0 # |
| 27 | define <16 x i1> @compare_ne_v16i8 (<16 x i8> %x, <16 x i8> %y) { |
| 28 | %res = icmp ne <16 x i8> %x, %y |
| 29 | ret <16 x i1> %res |
| 30 | } |
| 31 | |
| 32 | ; CHECK-LABEL: compare_slt_v16i8: |
| 33 | ; NO-SIMD128-NOT: i8x16 |
| 34 | ; SIMD128: .param v128, v128{{$}} |
| 35 | ; SIMD128: .result v128{{$}} |
| 36 | ; SIMD128: i8x16.lt_s $push0=, $0, $1 # encoding: [0xfd,0x52]{{$}} |
| 37 | ; SIMD128: return $pop0 # |
| 38 | define <16 x i1> @compare_slt_v16i8 (<16 x i8> %x, <16 x i8> %y) { |
| 39 | %res = icmp slt <16 x i8> %x, %y |
| 40 | ret <16 x i1> %res |
| 41 | } |
| 42 | |
| 43 | ; CHECK-LABEL: compare_ult_v16i8: |
| 44 | ; NO-SIMD128-NOT: i8x16 |
| 45 | ; SIMD128: .param v128, v128{{$}} |
| 46 | ; SIMD128: .result v128{{$}} |
| 47 | ; SIMD128: i8x16.lt_u $push0=, $0, $1 # encoding: [0xfd,0x53]{{$}} |
| 48 | ; SIMD128: return $pop0 # |
| 49 | define <16 x i1> @compare_ult_v16i8 (<16 x i8> %x, <16 x i8> %y) { |
| 50 | %res = icmp ult <16 x i8> %x, %y |
| 51 | ret <16 x i1> %res |
| 52 | } |
| 53 | |
| 54 | ; CHECK-LABEL: compare_sle_v16i8: |
| 55 | ; NO-SIMD128-NOT: i8x16 |
| 56 | ; SIMD128: .param v128, v128{{$}} |
| 57 | ; SIMD128: .result v128{{$}} |
| 58 | ; SIMD128: i8x16.le_s $push0=, $0, $1 # encoding: [0xfd,0x5a]{{$}} |
| 59 | ; SIMD128: return $pop0 # |
| 60 | define <16 x i1> @compare_sle_v16i8 (<16 x i8> %x, <16 x i8> %y) { |
| 61 | %res = icmp sle <16 x i8> %x, %y |
| 62 | ret <16 x i1> %res |
| 63 | } |
| 64 | |
| 65 | ; CHECK-LABEL: compare_ule_v16i8: |
| 66 | ; NO-SIMD128-NOT: i8x16 |
| 67 | ; SIMD128: .param v128, v128{{$}} |
| 68 | ; SIMD128: .result v128{{$}} |
| 69 | ; SIMD128: i8x16.le_u $push0=, $0, $1 # encoding: [0xfd,0x5b]{{$}} |
| 70 | ; SIMD128: return $pop0 # |
| 71 | define <16 x i1> @compare_ule_v16i8 (<16 x i8> %x, <16 x i8> %y) { |
| 72 | %res = icmp ule <16 x i8> %x, %y |
| 73 | ret <16 x i1> %res |
| 74 | } |
| 75 | |
| 76 | ; CHECK-LABEL: compare_sgt_v16i8: |
| 77 | ; NO-SIMD128-NOT: i8x16 |
| 78 | ; SIMD128: .param v128, v128{{$}} |
| 79 | ; SIMD128: .result v128{{$}} |
| 80 | ; SIMD128: i8x16.gt_s $push0=, $0, $1 # encoding: [0xfd,0x62]{{$}} |
| 81 | ; SIMD128: return $pop0 # |
| 82 | define <16 x i1> @compare_sgt_v16i8 (<16 x i8> %x, <16 x i8> %y) { |
| 83 | %res = icmp sgt <16 x i8> %x, %y |
| 84 | ret <16 x i1> %res |
| 85 | } |
| 86 | |
| 87 | ; CHECK-LABEL: compare_ugt_v16i8: |
| 88 | ; NO-SIMD128-NOT: i8x16 |
| 89 | ; SIMD128: .param v128, v128{{$}} |
| 90 | ; SIMD128: .result v128{{$}} |
| 91 | ; SIMD128: i8x16.gt_u $push0=, $0, $1 # encoding: [0xfd,0x63]{{$}} |
| 92 | ; SIMD128: return $pop0 # |
| 93 | define <16 x i1> @compare_ugt_v16i8 (<16 x i8> %x, <16 x i8> %y) { |
| 94 | %res = icmp ugt <16 x i8> %x, %y |
| 95 | ret <16 x i1> %res |
| 96 | } |
| 97 | |
| 98 | ; CHECK-LABEL: compare_sge_v16i8: |
| 99 | ; NO-SIMD128-NOT: i8x16 |
| 100 | ; SIMD128: .param v128, v128{{$}} |
| 101 | ; SIMD128: .result v128{{$}} |
| 102 | ; SIMD128: i8x16.ge_s $push0=, $0, $1 # encoding: [0xfd,0x6a]{{$}} |
| 103 | ; SIMD128: return $pop0 # |
| 104 | define <16 x i1> @compare_sge_v16i8 (<16 x i8> %x, <16 x i8> %y) { |
| 105 | %res = icmp sge <16 x i8> %x, %y |
| 106 | ret <16 x i1> %res |
| 107 | } |
| 108 | |
| 109 | ; CHECK-LABEL: compare_uge_v16i8: |
| 110 | ; NO-SIMD128-NOT: i8x16 |
| 111 | ; SIMD128: .param v128, v128{{$}} |
| 112 | ; SIMD128: .result v128{{$}} |
| 113 | ; SIMD128: i8x16.ge_u $push0=, $0, $1 # encoding: [0xfd,0x6b]{{$}} |
| 114 | ; SIMD128: return $pop0 # |
| 115 | define <16 x i1> @compare_uge_v16i8 (<16 x i8> %x, <16 x i8> %y) { |
| 116 | %res = icmp uge <16 x i8> %x, %y |
| 117 | ret <16 x i1> %res |
| 118 | } |
| 119 | |
| 120 | ; CHECK-LABEL: compare_eq_v8i16: |
| 121 | ; NO-SIMD128-NOT: i16x8 |
| 122 | ; SIMD128: .param v128, v128{{$}} |
| 123 | ; SIMD128: .result v128{{$}} |
| 124 | ; SIMD128: i16x8.eq $push0=, $0, $1 # encoding: [0xfd,0x49]{{$}} |
| 125 | ; SIMD128: return $pop0 # |
| 126 | define <8 x i1> @compare_eq_v8i16 (<8 x i16> %x, <8 x i16> %y) { |
| 127 | %res = icmp eq <8 x i16> %x, %y |
| 128 | ret <8 x i1> %res |
| 129 | } |
| 130 | |
| 131 | ; CHECK-LABEL: compare_ne_v8i16: |
| 132 | ; NO-SIMD128-NOT: i16x8 |
| 133 | ; SIMD128: .param v128, v128{{$}} |
| 134 | ; SIMD128: .result v128{{$}} |
| 135 | ; SIMD128: i16x8.ne $push0=, $0, $1 # encoding: [0xfd,0x4e]{{$}} |
| 136 | ; SIMD128: return $pop0 # |
| 137 | define <8 x i1> @compare_ne_v8i16 (<8 x i16> %x, <8 x i16> %y) { |
| 138 | %res = icmp ne <8 x i16> %x, %y |
| 139 | ret <8 x i1> %res |
| 140 | } |
| 141 | |
| 142 | ; CHECK-LABEL: compare_slt_v8i16: |
| 143 | ; NO-SIMD128-NOT: i16x8 |
| 144 | ; SIMD128: .param v128, v128{{$}} |
| 145 | ; SIMD128: .result v128{{$}} |
| 146 | ; SIMD128: i16x8.lt_s $push0=, $0, $1 # encoding: [0xfd,0x54]{{$}} |
| 147 | ; SIMD128: return $pop0 # |
| 148 | define <8 x i1> @compare_slt_v8i16 (<8 x i16> %x, <8 x i16> %y) { |
| 149 | %res = icmp slt <8 x i16> %x, %y |
| 150 | ret <8 x i1> %res |
| 151 | } |
| 152 | |
| 153 | ; CHECK-LABEL: compare_ult_v8i16: |
| 154 | ; NO-SIMD128-NOT: i16x8 |
| 155 | ; SIMD128: .param v128, v128{{$}} |
| 156 | ; SIMD128: .result v128{{$}} |
| 157 | ; SIMD128: i16x8.lt_u $push0=, $0, $1 # encoding: [0xfd,0x55]{{$}} |
| 158 | ; SIMD128: return $pop0 # |
| 159 | define <8 x i1> @compare_ult_v8i16 (<8 x i16> %x, <8 x i16> %y) { |
| 160 | %res = icmp ult <8 x i16> %x, %y |
| 161 | ret <8 x i1> %res |
| 162 | } |
| 163 | |
| 164 | ; CHECK-LABEL: compare_sle_v8i16: |
| 165 | ; NO-SIMD128-NOT: i16x8 |
| 166 | ; SIMD128: .param v128, v128{{$}} |
| 167 | ; SIMD128: .result v128{{$}} |
| 168 | ; SIMD128: i16x8.le_s $push0=, $0, $1 # encoding: [0xfd,0x5c]{{$}} |
| 169 | ; SIMD128: return $pop0 # |
| 170 | define <8 x i1> @compare_sle_v8i16 (<8 x i16> %x, <8 x i16> %y) { |
| 171 | %res = icmp sle <8 x i16> %x, %y |
| 172 | ret <8 x i1> %res |
| 173 | } |
| 174 | |
| 175 | ; CHECK-LABEL: compare_ule_v8i16: |
| 176 | ; NO-SIMD128-NOT: i16x8 |
| 177 | ; SIMD128: .param v128, v128{{$}} |
| 178 | ; SIMD128: .result v128{{$}} |
| 179 | ; SIMD128: i16x8.le_u $push0=, $0, $1 # encoding: [0xfd,0x5d]{{$}} |
| 180 | ; SIMD128: return $pop0 # |
| 181 | define <8 x i1> @compare_ule_v8i16 (<8 x i16> %x, <8 x i16> %y) { |
| 182 | %res = icmp ule <8 x i16> %x, %y |
| 183 | ret <8 x i1> %res |
| 184 | } |
| 185 | |
| 186 | ; CHECK-LABEL: compare_sgt_v8i16: |
| 187 | ; NO-SIMD128-NOT: i16x8 |
| 188 | ; SIMD128: .param v128, v128{{$}} |
| 189 | ; SIMD128: .result v128{{$}} |
| 190 | ; SIMD128: i16x8.gt_s $push0=, $0, $1 # encoding: [0xfd,0x64]{{$}} |
| 191 | ; SIMD128: return $pop0 # |
| 192 | define <8 x i1> @compare_sgt_v8i16 (<8 x i16> %x, <8 x i16> %y) { |
| 193 | %res = icmp sgt <8 x i16> %x, %y |
| 194 | ret <8 x i1> %res |
| 195 | } |
| 196 | |
| 197 | ; CHECK-LABEL: compare_ugt_v8i16: |
| 198 | ; NO-SIMD128-NOT: i16x8 |
| 199 | ; SIMD128: .param v128, v128{{$}} |
| 200 | ; SIMD128: .result v128{{$}} |
| 201 | ; SIMD128: i16x8.gt_u $push0=, $0, $1 # encoding: [0xfd,0x65]{{$}} |
| 202 | ; SIMD128: return $pop0 # |
| 203 | define <8 x i1> @compare_ugt_v8i16 (<8 x i16> %x, <8 x i16> %y) { |
| 204 | %res = icmp ugt <8 x i16> %x, %y |
| 205 | ret <8 x i1> %res |
| 206 | } |
| 207 | |
| 208 | ; CHECK-LABEL: compare_sge_v8i16: |
| 209 | ; NO-SIMD128-NOT: i16x8 |
| 210 | ; SIMD128: .param v128, v128{{$}} |
| 211 | ; SIMD128: .result v128{{$}} |
| 212 | ; SIMD128: i16x8.ge_s $push0=, $0, $1 # encoding: [0xfd,0x6c]{{$}} |
| 213 | ; SIMD128: return $pop0 # |
| 214 | define <8 x i1> @compare_sge_v8i16 (<8 x i16> %x, <8 x i16> %y) { |
| 215 | %res = icmp sge <8 x i16> %x, %y |
| 216 | ret <8 x i1> %res |
| 217 | } |
| 218 | |
| 219 | ; CHECK-LABEL: compare_uge_v8i16: |
| 220 | ; NO-SIMD128-NOT: i16x8 |
| 221 | ; SIMD128: .param v128, v128{{$}} |
| 222 | ; SIMD128: .result v128{{$}} |
| 223 | ; SIMD128: i16x8.ge_u $push0=, $0, $1 # encoding: [0xfd,0x6d]{{$}} |
| 224 | ; SIMD128: return $pop0 # |
| 225 | define <8 x i1> @compare_uge_v8i16 (<8 x i16> %x, <8 x i16> %y) { |
| 226 | %res = icmp uge <8 x i16> %x, %y |
| 227 | ret <8 x i1> %res |
| 228 | } |
| 229 | |
| 230 | ; CHECK-LABEL: compare_eq_v4i32: |
| 231 | ; NO-SIMD128-NOT: i32x4 |
| 232 | ; SIMD128: .param v128, v128{{$}} |
| 233 | ; SIMD128: .result v128{{$}} |
| 234 | ; SIMD128: i32x4.eq $push0=, $0, $1 # encoding: [0xfd,0x4a]{{$}} |
| 235 | ; SIMD128: return $pop0 # |
| 236 | define <4 x i1> @compare_eq_v4i32 (<4 x i32> %x, <4 x i32> %y) { |
| 237 | %res = icmp eq <4 x i32> %x, %y |
| 238 | ret <4 x i1> %res |
| 239 | } |
| 240 | |
| 241 | ; CHECK-LABEL: compare_ne_v4i32: |
| 242 | ; NO-SIMD128-NOT: i32x4 |
| 243 | ; SIMD128: .param v128, v128{{$}} |
| 244 | ; SIMD128: .result v128{{$}} |
| 245 | ; SIMD128: i32x4.ne $push0=, $0, $1 # encoding: [0xfd,0x4f]{{$}} |
| 246 | ; SIMD128: return $pop0 # |
| 247 | define <4 x i1> @compare_ne_v4i32 (<4 x i32> %x, <4 x i32> %y) { |
| 248 | %res = icmp ne <4 x i32> %x, %y |
| 249 | ret <4 x i1> %res |
| 250 | } |
| 251 | |
| 252 | ; CHECK-LABEL: compare_slt_v4i32: |
| 253 | ; NO-SIMD128-NOT: i32x4 |
| 254 | ; SIMD128: .param v128, v128{{$}} |
| 255 | ; SIMD128: .result v128{{$}} |
| 256 | ; SIMD128: i32x4.lt_s $push0=, $0, $1 # encoding: [0xfd,0x56]{{$}} |
| 257 | ; SIMD128: return $pop0 # |
| 258 | define <4 x i1> @compare_slt_v4i32 (<4 x i32> %x, <4 x i32> %y) { |
| 259 | %res = icmp slt <4 x i32> %x, %y |
| 260 | ret <4 x i1> %res |
| 261 | } |
| 262 | |
| 263 | ; CHECK-LABEL: compare_ult_v4i32: |
| 264 | ; NO-SIMD128-NOT: i32x4 |
| 265 | ; SIMD128: .param v128, v128{{$}} |
| 266 | ; SIMD128: .result v128{{$}} |
| 267 | ; SIMD128: i32x4.lt_u $push0=, $0, $1 # encoding: [0xfd,0x57]{{$}} |
| 268 | ; SIMD128: return $pop0 # |
| 269 | define <4 x i1> @compare_ult_v4i32 (<4 x i32> %x, <4 x i32> %y) { |
| 270 | %res = icmp ult <4 x i32> %x, %y |
| 271 | ret <4 x i1> %res |
| 272 | } |
| 273 | |
| 274 | ; CHECK-LABEL: compare_sle_v4i32: |
| 275 | ; NO-SIMD128-NOT: i32x4 |
| 276 | ; SIMD128: .param v128, v128{{$}} |
| 277 | ; SIMD128: .result v128{{$}} |
| 278 | ; SIMD128: i32x4.le_s $push0=, $0, $1 # encoding: [0xfd,0x5e]{{$}} |
| 279 | ; SIMD128: return $pop0 # |
| 280 | define <4 x i1> @compare_sle_v4i32 (<4 x i32> %x, <4 x i32> %y) { |
| 281 | %res = icmp sle <4 x i32> %x, %y |
| 282 | ret <4 x i1> %res |
| 283 | } |
| 284 | |
| 285 | ; CHECK-LABEL: compare_ule_v4i32: |
| 286 | ; NO-SIMD128-NOT: i32x4 |
| 287 | ; SIMD128: .param v128, v128{{$}} |
| 288 | ; SIMD128: .result v128{{$}} |
| 289 | ; SIMD128: i32x4.le_u $push0=, $0, $1 # encoding: [0xfd,0x5f]{{$}} |
| 290 | ; SIMD128: return $pop0 # |
| 291 | define <4 x i1> @compare_ule_v4i32 (<4 x i32> %x, <4 x i32> %y) { |
| 292 | %res = icmp ule <4 x i32> %x, %y |
| 293 | ret <4 x i1> %res |
| 294 | } |
| 295 | |
| 296 | ; CHECK-LABEL: compare_sgt_v4i32: |
| 297 | ; NO-SIMD128-NOT: i32x4 |
| 298 | ; SIMD128: .param v128, v128{{$}} |
| 299 | ; SIMD128: .result v128{{$}} |
| 300 | ; SIMD128: i32x4.gt_s $push0=, $0, $1 # encoding: [0xfd,0x66]{{$}} |
| 301 | ; SIMD128: return $pop0 # |
| 302 | define <4 x i1> @compare_sgt_v4i32 (<4 x i32> %x, <4 x i32> %y) { |
| 303 | %res = icmp sgt <4 x i32> %x, %y |
| 304 | ret <4 x i1> %res |
| 305 | } |
| 306 | |
| 307 | ; CHECK-LABEL: compare_ugt_v4i32: |
| 308 | ; NO-SIMD128-NOT: i32x4 |
| 309 | ; SIMD128: .param v128, v128{{$}} |
| 310 | ; SIMD128: .result v128{{$}} |
| 311 | ; SIMD128: i32x4.gt_u $push0=, $0, $1 # encoding: [0xfd,0x67]{{$}} |
| 312 | ; SIMD128: return $pop0 # |
| 313 | define <4 x i1> @compare_ugt_v4i32 (<4 x i32> %x, <4 x i32> %y) { |
| 314 | %res = icmp ugt <4 x i32> %x, %y |
| 315 | ret <4 x i1> %res |
| 316 | } |
| 317 | |
| 318 | ; CHECK-LABEL: compare_sge_v4i32: |
| 319 | ; NO-SIMD128-NOT: i32x4 |
| 320 | ; SIMD128: .param v128, v128{{$}} |
| 321 | ; SIMD128: .result v128{{$}} |
| 322 | ; SIMD128: i32x4.ge_s $push0=, $0, $1 # encoding: [0xfd,0x6e]{{$}} |
| 323 | ; SIMD128: return $pop0 # |
| 324 | define <4 x i1> @compare_sge_v4i32 (<4 x i32> %x, <4 x i32> %y) { |
| 325 | %res = icmp sge <4 x i32> %x, %y |
| 326 | ret <4 x i1> %res |
| 327 | } |
| 328 | |
| 329 | ; CHECK-LABEL: compare_uge_v4i32: |
| 330 | ; NO-SIMD128-NOT: i32x4 |
| 331 | ; SIMD128: .param v128, v128{{$}} |
| 332 | ; SIMD128: .result v128{{$}} |
| 333 | ; SIMD128: i32x4.ge_u $push0=, $0, $1 # encoding: [0xfd,0x6f]{{$}} |
| 334 | ; SIMD128: return $pop0 # |
| 335 | define <4 x i1> @compare_uge_v4i32 (<4 x i32> %x, <4 x i32> %y) { |
| 336 | %res = icmp uge <4 x i32> %x, %y |
| 337 | ret <4 x i1> %res |
| 338 | } |
| 339 | |
| 340 | ; CHECK-LABEL: compare_oeq_v4f32: |
| 341 | ; NO-SIMD128-NOT: f32x4 |
| 342 | ; SIMD128: .param v128, v128{{$}} |
| 343 | ; SIMD128: .result v128{{$}} |
| 344 | ; SIMD128: f32x4.eq $push0=, $0, $1 # encoding: [0xfd,0x4b]{{$}} |
| 345 | ; SIMD128: return $pop0 # |
| 346 | define <4 x i1> @compare_oeq_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 347 | %res = fcmp oeq <4 x float> %x, %y |
| 348 | ret <4 x i1> %res |
| 349 | } |
| 350 | |
| 351 | ; CHECK-LABEL: compare_ogt_v4f32: |
| 352 | ; NO-SIMD128-NOT: f32x4 |
| 353 | ; SIMD128: .param v128, v128{{$}} |
| 354 | ; SIMD128: .result v128{{$}} |
| 355 | ; SIMD128: f32x4.gt $push0=, $0, $1 # encoding: [0xfd,0x68]{{$}} |
| 356 | ; SIMD128: return $pop0 # |
| 357 | define <4 x i1> @compare_ogt_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 358 | %res = fcmp ogt <4 x float> %x, %y |
| 359 | ret <4 x i1> %res |
| 360 | } |
| 361 | |
| 362 | ; CHECK-LABEL: compare_oge_v4f32: |
| 363 | ; NO-SIMD128-NOT: f32x4 |
| 364 | ; SIMD128: .param v128, v128{{$}} |
| 365 | ; SIMD128: .result v128{{$}} |
| 366 | ; SIMD128: f32x4.ge $push0=, $0, $1 # encoding: [0xfd,0x70]{{$}} |
| 367 | ; SIMD128: return $pop0 # |
| 368 | define <4 x i1> @compare_oge_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 369 | %res = fcmp oge <4 x float> %x, %y |
| 370 | ret <4 x i1> %res |
| 371 | } |
| 372 | |
| 373 | ; CHECK-LABEL: compare_olt_v4f32: |
| 374 | ; NO-SIMD128-NOT: f32x4 |
| 375 | ; SIMD128: .param v128, v128{{$}} |
| 376 | ; SIMD128: .result v128{{$}} |
| 377 | ; SIMD128: f32x4.lt $push0=, $0, $1 # encoding: [0xfd,0x58]{{$}} |
| 378 | ; SIMD128: return $pop0 # |
| 379 | define <4 x i1> @compare_olt_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 380 | %res = fcmp olt <4 x float> %x, %y |
| 381 | ret <4 x i1> %res |
| 382 | } |
| 383 | |
| 384 | ; CHECK-LABEL: compare_ole_v4f32: |
| 385 | ; NO-SIMD128-NOT: f32x4 |
| 386 | ; SIMD128: .param v128, v128{{$}} |
| 387 | ; SIMD128: .result v128{{$}} |
| 388 | ; SIMD128: f32x4.le $push0=, $0, $1 # encoding: [0xfd,0x60]{{$}} |
| 389 | ; SIMD128: return $pop0 # |
| 390 | define <4 x i1> @compare_ole_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 391 | %res = fcmp ole <4 x float> %x, %y |
| 392 | ret <4 x i1> %res |
| 393 | } |
| 394 | |
| 395 | ; CHECK-LABEL: compare_one_v4f32: |
| 396 | ; NO-SIMD128-NOT: f32x4 |
| 397 | ; SIMD128: .param v128, v128{{$}} |
| 398 | ; SIMD128: .result v128{{$}} |
| 399 | ; SIMD128: f32x4.ne |
| 400 | define <4 x i1> @compare_one_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 401 | %res = fcmp one <4 x float> %x, %y |
| 402 | ret <4 x i1> %res |
| 403 | } |
| 404 | |
| 405 | ; CHECK-LABEL: compare_ord_v4f32: |
| 406 | ; NO-SIMD128-NOT: f32x4 |
| 407 | ; SIMD128: .param v128, v128{{$}} |
| 408 | ; SIMD128: .result v128{{$}} |
| 409 | ; SIMD128: f32x4.eq |
| 410 | define <4 x i1> @compare_ord_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 411 | %res = fcmp ord <4 x float> %x, %y |
| 412 | ret <4 x i1> %res |
| 413 | } |
| 414 | |
| 415 | ; CHECK-LABEL: compare_ueq_v4f32: |
| 416 | ; NO-SIMD128-NOT: f32x4 |
| 417 | ; SIMD128: .param v128, v128{{$}} |
| 418 | ; SIMD128: .result v128{{$}} |
| 419 | ; SIMD128: f32x4.eq |
| 420 | define <4 x i1> @compare_ueq_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 421 | %res = fcmp ueq <4 x float> %x, %y |
| 422 | ret <4 x i1> %res |
| 423 | } |
| 424 | |
| 425 | ; CHECK-LABEL: compare_ugt_v4f32: |
| 426 | ; NO-SIMD128-NOT: f32x4 |
| 427 | ; SIMD128: .param v128, v128{{$}} |
| 428 | ; SIMD128: .result v128{{$}} |
| 429 | ; SIMD128: f32x4.le |
| 430 | define <4 x i1> @compare_ugt_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 431 | %res = fcmp ugt <4 x float> %x, %y |
| 432 | ret <4 x i1> %res |
| 433 | } |
| 434 | |
| 435 | ; CHECK-LABEL: compare_uge_v4f32: |
| 436 | ; NO-SIMD128-NOT: f32x4 |
| 437 | ; SIMD128: .param v128, v128{{$}} |
| 438 | ; SIMD128: .result v128{{$}} |
| 439 | ; SIMD128: f32x4.lt |
| 440 | define <4 x i1> @compare_uge_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 441 | %res = fcmp uge <4 x float> %x, %y |
| 442 | ret <4 x i1> %res |
| 443 | } |
| 444 | |
| 445 | ; CHECK-LABEL: compare_ult_v4f32: |
| 446 | ; NO-SIMD128-NOT: f32x4 |
| 447 | ; SIMD128: .param v128, v128{{$}} |
| 448 | ; SIMD128: .result v128{{$}} |
| 449 | ; SIMD128: f32x4.ge |
| 450 | define <4 x i1> @compare_ult_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 451 | %res = fcmp ult <4 x float> %x, %y |
| 452 | ret <4 x i1> %res |
| 453 | } |
| 454 | |
| 455 | ; CHECK-LABEL: compare_ule_v4f32: |
| 456 | ; NO-SIMD128-NOT: f32x4 |
| 457 | ; SIMD128: .param v128, v128{{$}} |
| 458 | ; SIMD128: .result v128{{$}} |
| 459 | ; SIMD128: f32x4.gt |
| 460 | define <4 x i1> @compare_ule_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 461 | %res = fcmp ule <4 x float> %x, %y |
| 462 | ret <4 x i1> %res |
| 463 | } |
| 464 | |
| 465 | ; CHECK-LABEL: compare_une_v4f32: |
| 466 | ; NO-SIMD128-NOT: f32x4 |
| 467 | ; SIMD128: .param v128, v128{{$}} |
| 468 | ; SIMD128: .result v128{{$}} |
| 469 | ; SIMD128: f32x4.ne $push0=, $0, $1 # encoding: [0xfd,0x50]{{$}} |
| 470 | ; SIMD128: return $pop0 # |
| 471 | define <4 x i1> @compare_une_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 472 | %res = fcmp une <4 x float> %x, %y |
| 473 | ret <4 x i1> %res |
| 474 | } |
| 475 | |
| 476 | ; CHECK-LABEL: compare_uno_v4f32: |
| 477 | ; NO-SIMD128-NOT: f32x4 |
| 478 | ; SIMD128: .param v128, v128{{$}} |
| 479 | ; SIMD128: .result v128{{$}} |
| 480 | ; SIMD128: f32x4.ne |
| 481 | define <4 x i1> @compare_uno_v4f32 (<4 x float> %x, <4 x float> %y) { |
| 482 | %res = fcmp uno <4 x float> %x, %y |
| 483 | ret <4 x i1> %res |
| 484 | } |
| 485 | |
| 486 | ; CHECK-LABEL: compare_oeq_v2f64: |
| 487 | ; NO-SIMD128-NOT: f64x2 |
| 488 | ; SIMD128-VM-NOT: f64x2 |
| 489 | ; SIMD128: .param v128, v128{{$}} |
| 490 | ; SIMD128: .result v128{{$}} |
| 491 | ; SIMD128: f64x2.eq $push0=, $0, $1 # encoding: [0xfd,0x4c]{{$}} |
| 492 | ; SIMD128: return $pop0 # |
| 493 | define <2 x i1> @compare_oeq_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 494 | %res = fcmp oeq <2 x double> %x, %y |
| 495 | ret <2 x i1> %res |
| 496 | } |
| 497 | |
| 498 | ; CHECK-LABEL: compare_ogt_v2f64: |
| 499 | ; NO-SIMD128-NOT: f64x2 |
| 500 | ; SIMD128-VM-NOT: f64x2 |
| 501 | ; SIMD128: .param v128, v128{{$}} |
| 502 | ; SIMD128: .result v128{{$}} |
| 503 | ; SIMD128: f64x2.gt $push0=, $0, $1 # encoding: [0xfd,0x69]{{$}} |
| 504 | ; SIMD128: return $pop0 # |
| 505 | define <2 x i1> @compare_ogt_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 506 | %res = fcmp ogt <2 x double> %x, %y |
| 507 | ret <2 x i1> %res |
| 508 | } |
| 509 | |
| 510 | ; CHECK-LABEL: compare_oge_v2f64: |
| 511 | ; NO-SIMD128-NOT: f64x2 |
| 512 | ; SIMD128-VM-NOT: f64x2 |
| 513 | ; SIMD128: .param v128, v128{{$}} |
| 514 | ; SIMD128: .result v128{{$}} |
| 515 | ; SIMD128: f64x2.ge $push0=, $0, $1 # encoding: [0xfd,0x71]{{$}} |
| 516 | ; SIMD128: return $pop0 # |
| 517 | define <2 x i1> @compare_oge_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 518 | %res = fcmp oge <2 x double> %x, %y |
| 519 | ret <2 x i1> %res |
| 520 | } |
| 521 | |
| 522 | ; CHECK-LABEL: compare_olt_v2f64: |
| 523 | ; NO-SIMD128-NOT: f64x2 |
| 524 | ; SIMD128-VM-NOT: f64x2 |
| 525 | ; SIMD128: .param v128, v128{{$}} |
| 526 | ; SIMD128: .result v128{{$}} |
| 527 | ; SIMD128: f64x2.lt $push0=, $0, $1 # encoding: [0xfd,0x59]{{$}} |
| 528 | ; SIMD128: return $pop0 # |
| 529 | define <2 x i1> @compare_olt_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 530 | %res = fcmp olt <2 x double> %x, %y |
| 531 | ret <2 x i1> %res |
| 532 | } |
| 533 | |
| 534 | ; CHECK-LABEL: compare_ole_v2f64: |
| 535 | ; NO-SIMD128-NOT: f64x2 |
| 536 | ; SIMD128-VM-NOT: f64x2 |
| 537 | ; SIMD128: .param v128, v128{{$}} |
| 538 | ; SIMD128: .result v128{{$}} |
| 539 | ; SIMD128: f64x2.le $push0=, $0, $1 # encoding: [0xfd,0x61]{{$}} |
| 540 | ; SIMD128: return $pop0 # |
| 541 | define <2 x i1> @compare_ole_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 542 | %res = fcmp ole <2 x double> %x, %y |
| 543 | ret <2 x i1> %res |
| 544 | } |
| 545 | |
| 546 | ; CHECK-LABEL: compare_one_v2f64: |
| 547 | ; NO-SIMD128-NOT: f64x2 |
| 548 | ; SIMD128-VM-NOT: f64x2 |
| 549 | ; SIMD128: .param v128, v128{{$}} |
| 550 | ; SIMD128: .result v128{{$}} |
| 551 | ; SIMD128: f64x2.ne |
| 552 | define <2 x i1> @compare_one_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 553 | %res = fcmp one <2 x double> %x, %y |
| 554 | ret <2 x i1> %res |
| 555 | } |
| 556 | |
| 557 | ; CHECK-LABEL: compare_ord_v2f64: |
| 558 | ; NO-SIMD128-NOT: f64x2 |
| 559 | ; SIMD128-VM-NOT: f64x2 |
| 560 | ; SIMD128: .param v128, v128{{$}} |
| 561 | ; SIMD128: .result v128{{$}} |
| 562 | ; SIMD128: f64x2.eq |
| 563 | define <2 x i1> @compare_ord_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 564 | %res = fcmp ord <2 x double> %x, %y |
| 565 | ret <2 x i1> %res |
| 566 | } |
| 567 | |
| 568 | ; CHECK-LABEL: compare_ueq_v2f64: |
| 569 | ; NO-SIMD128-NOT: f64x2 |
| 570 | ; SIMD128-VM-NOT: f64x2 |
| 571 | ; SIMD128: .param v128, v128{{$}} |
| 572 | ; SIMD128: .result v128{{$}} |
| 573 | ; SIMD128: f64x2.eq |
| 574 | define <2 x i1> @compare_ueq_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 575 | %res = fcmp ueq <2 x double> %x, %y |
| 576 | ret <2 x i1> %res |
| 577 | } |
| 578 | |
| 579 | ; CHECK-LABEL: compare_ugt_v2f64: |
| 580 | ; NO-SIMD128-NOT: f64x2 |
| 581 | ; SIMD128-VM-NOT: f64x2 |
| 582 | ; SIMD128: .param v128, v128{{$}} |
| 583 | ; SIMD128: .result v128{{$}} |
| 584 | ; SIMD128: f64x2.le |
| 585 | define <2 x i1> @compare_ugt_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 586 | %res = fcmp ugt <2 x double> %x, %y |
| 587 | ret <2 x i1> %res |
| 588 | } |
| 589 | |
| 590 | ; CHECK-LABEL: compare_uge_v2f64: |
| 591 | ; NO-SIMD128-NOT: f64x2 |
| 592 | ; SIMD128-VM-NOT: f64x2 |
| 593 | ; SIMD128: .param v128, v128{{$}} |
| 594 | ; SIMD128: .result v128{{$}} |
| 595 | ; SIMD128: f64x2.lt |
| 596 | define <2 x i1> @compare_uge_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 597 | %res = fcmp uge <2 x double> %x, %y |
| 598 | ret <2 x i1> %res |
| 599 | } |
| 600 | |
| 601 | ; CHECK-LABEL: compare_ult_v2f64: |
| 602 | ; NO-SIMD128-NOT: f64x2 |
| 603 | ; SIMD128-VM-NOT: f64x2 |
| 604 | ; SIMD128: .param v128, v128{{$}} |
| 605 | ; SIMD128: .result v128{{$}} |
| 606 | ; SIMD128: f64x2.ge |
| 607 | define <2 x i1> @compare_ult_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 608 | %res = fcmp ult <2 x double> %x, %y |
| 609 | ret <2 x i1> %res |
| 610 | } |
| 611 | |
| 612 | ; CHECK-LABEL: compare_ule_v2f64: |
| 613 | ; NO-SIMD128-NOT: f64x2 |
| 614 | ; SIMD128-VM-NOT: f64x2 |
| 615 | ; SIMD128: .param v128, v128{{$}} |
| 616 | ; SIMD128: .result v128{{$}} |
| 617 | ; SIMD128: f64x2.gt |
| 618 | define <2 x i1> @compare_ule_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 619 | %res = fcmp ule <2 x double> %x, %y |
| 620 | ret <2 x i1> %res |
| 621 | } |
| 622 | |
| 623 | ; CHECK-LABEL: compare_une_v2f64: |
| 624 | ; NO-SIMD128-NOT: f64x2 |
| 625 | ; SIMD128-VM-NOT: f64x2 |
| 626 | ; SIMD128: .param v128, v128{{$}} |
| 627 | ; SIMD128: .result v128{{$}} |
| 628 | ; SIMD128: f64x2.ne $push0=, $0, $1 # encoding: [0xfd,0x51]{{$}} |
| 629 | ; SIMD128: return $pop0 # |
| 630 | define <2 x i1> @compare_une_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 631 | %res = fcmp une <2 x double> %x, %y |
| 632 | ret <2 x i1> %res |
| 633 | } |
| 634 | |
| 635 | ; CHECK-LABEL: compare_uno_v2f64: |
| 636 | ; NO-SIMD128-NOT: f64x2 |
| 637 | ; SIMD128-VM-NOT: f64x2 |
| 638 | ; SIMD128: .param v128, v128{{$}} |
| 639 | ; SIMD128: .result v128{{$}} |
| 640 | ; SIMD128: f64x2.ne |
| 641 | define <2 x i1> @compare_uno_v2f64 (<2 x double> %x, <2 x double> %y) { |
| 642 | %res = fcmp uno <2 x double> %x, %y |
| 643 | ret <2 x i1> %res |
| 644 | } |