1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s
4 define <4 x i1> @t0_all_tautological(<4 x i32> %X) nounwind {
5 ; CHECK-LABEL: t0_all_tautological:
7 ; CHECK-NEXT: adrp x8, .LCPI0_0
8 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI0_0]
9 ; CHECK-NEXT: adrp x8, .LCPI0_1
10 ; CHECK-NEXT: ldr q2, [x8, :lo12:.LCPI0_1]
11 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
12 ; CHECK-NEXT: cmeq v0.4s, v0.4s, v2.4s
13 ; CHECK-NEXT: xtn v0.4h, v0.4s
15 %urem = urem <4 x i32> %X, <i32 1, i32 1, i32 2, i32 2>
16 %cmp = icmp eq <4 x i32> %urem, <i32 0, i32 1, i32 2, i32 3>
20 define <4 x i1> @t1_all_odd_eq(<4 x i32> %X) nounwind {
21 ; CHECK-LABEL: t1_all_odd_eq:
23 ; CHECK-NEXT: adrp x8, .LCPI1_0
24 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI1_0]
25 ; CHECK-NEXT: mov w8, #43691
26 ; CHECK-NEXT: movk w8, #43690, lsl #16
27 ; CHECK-NEXT: dup v2.4s, w8
28 ; CHECK-NEXT: mul v0.4s, v0.4s, v2.4s
29 ; CHECK-NEXT: cmhs v0.4s, v1.4s, v0.4s
30 ; CHECK-NEXT: xtn v0.4h, v0.4s
31 ; CHECK-NEXT: movi d1, #0xffff0000ffff0000
32 ; CHECK-NEXT: eor v0.8b, v0.8b, v1.8b
34 %urem = urem <4 x i32> %X, <i32 3, i32 1, i32 1, i32 9>
35 %cmp = icmp eq <4 x i32> %urem, <i32 0, i32 42, i32 0, i32 42>
39 define <4 x i1> @t1_all_odd_ne(<4 x i32> %X) nounwind {
40 ; CHECK-LABEL: t1_all_odd_ne:
42 ; CHECK-NEXT: adrp x8, .LCPI2_0
43 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI2_0]
44 ; CHECK-NEXT: mov w8, #43691
45 ; CHECK-NEXT: movk w8, #43690, lsl #16
46 ; CHECK-NEXT: dup v2.4s, w8
47 ; CHECK-NEXT: mul v0.4s, v0.4s, v2.4s
48 ; CHECK-NEXT: cmhi v0.4s, v0.4s, v1.4s
49 ; CHECK-NEXT: xtn v0.4h, v0.4s
50 ; CHECK-NEXT: movi d1, #0xffff0000ffff0000
51 ; CHECK-NEXT: eor v0.8b, v0.8b, v1.8b
53 %urem = urem <4 x i32> %X, <i32 3, i32 1, i32 1, i32 9>
54 %cmp = icmp ne <4 x i32> %urem, <i32 0, i32 42, i32 0, i32 42>
58 define <8 x i1> @t2_narrow(<8 x i16> %X) nounwind {
59 ; CHECK-LABEL: t2_narrow:
61 ; CHECK-NEXT: adrp x8, .LCPI3_0
62 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI3_0]
63 ; CHECK-NEXT: mov w8, #43691
64 ; CHECK-NEXT: dup v2.8h, w8
65 ; CHECK-NEXT: mul v0.8h, v0.8h, v2.8h
66 ; CHECK-NEXT: cmhs v0.8h, v1.8h, v0.8h
67 ; CHECK-NEXT: xtn v0.8b, v0.8h
68 ; CHECK-NEXT: movi d1, #0xffff0000ffff0000
69 ; CHECK-NEXT: eor v0.8b, v0.8b, v1.8b
71 %urem = urem <8 x i16> %X, <i16 3, i16 1, i16 1, i16 9, i16 3, i16 1, i16 1, i16 9>
72 %cmp = icmp eq <8 x i16> %urem, <i16 0, i16 0, i16 42, i16 42, i16 0, i16 0, i16 42, i16 42>
76 define <2 x i1> @t3_wide(<2 x i64> %X) nounwind {
77 ; CHECK-LABEL: t3_wide:
79 ; CHECK-NEXT: mov x9, #-6148914691236517206
80 ; CHECK-NEXT: adrp x11, .LCPI4_0
81 ; CHECK-NEXT: mov x8, v0.d[1]
82 ; CHECK-NEXT: movk x9, #43691
83 ; CHECK-NEXT: fmov x10, d0
84 ; CHECK-NEXT: ldr q0, [x11, :lo12:.LCPI4_0]
85 ; CHECK-NEXT: mul x10, x10, x9
86 ; CHECK-NEXT: mul x8, x8, x9
87 ; CHECK-NEXT: fmov d1, x10
88 ; CHECK-NEXT: mov v1.d[1], x8
89 ; CHECK-NEXT: cmhs v0.2d, v0.2d, v1.2d
90 ; CHECK-NEXT: xtn v0.2s, v0.2d
91 ; CHECK-NEXT: movi d1, #0xffffffff00000000
92 ; CHECK-NEXT: eor v0.8b, v0.8b, v1.8b
94 %urem = urem <2 x i64> %X, <i64 3, i64 1>
95 %cmp = icmp eq <2 x i64> %urem, <i64 0, i64 42>