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> @t32_3(<4 x i32> %X) nounwind {
7 ; CHECK-NEXT: adrp x8, .LCPI0_0
8 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI0_0]
9 ; CHECK-NEXT: mov w8, #43691 // =0xaaab
10 ; CHECK-NEXT: movk w8, #43690, lsl #16
11 ; CHECK-NEXT: sub v0.4s, v0.4s, v1.4s
12 ; CHECK-NEXT: dup v1.4s, w8
13 ; CHECK-NEXT: adrp x8, .LCPI0_1
14 ; CHECK-NEXT: mul v0.4s, v0.4s, v1.4s
15 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI0_1]
16 ; CHECK-NEXT: cmhs v0.4s, v1.4s, v0.4s
17 ; CHECK-NEXT: xtn v0.4h, v0.4s
19 %urem = urem <4 x i32> %X, <i32 3, i32 3, i32 3, i32 3>
20 %cmp = icmp eq <4 x i32> %urem, <i32 0, i32 1, i32 2, i32 2>
24 define <4 x i1> @t32_5(<4 x i32> %X) nounwind {
27 ; CHECK-NEXT: adrp x8, .LCPI1_0
28 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI1_0]
29 ; CHECK-NEXT: mov w8, #52429 // =0xcccd
30 ; CHECK-NEXT: movk w8, #52428, lsl #16
31 ; CHECK-NEXT: sub v0.4s, v0.4s, v1.4s
32 ; CHECK-NEXT: dup v1.4s, w8
33 ; CHECK-NEXT: mov w8, #13106 // =0x3332
34 ; CHECK-NEXT: movk w8, #13107, lsl #16
35 ; CHECK-NEXT: mul v0.4s, v0.4s, v1.4s
36 ; CHECK-NEXT: dup v1.4s, w8
37 ; CHECK-NEXT: cmhs v0.4s, v1.4s, v0.4s
38 ; CHECK-NEXT: xtn v0.4h, v0.4s
40 %urem = urem <4 x i32> %X, <i32 5, i32 5, i32 5, i32 5>
41 %cmp = icmp eq <4 x i32> %urem, <i32 1, i32 2, i32 3, i32 4>
45 define <4 x i1> @t32_6_part0(<4 x i32> %X) nounwind {
46 ; CHECK-LABEL: t32_6_part0:
48 ; CHECK-NEXT: adrp x8, .LCPI2_0
49 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI2_0]
50 ; CHECK-NEXT: mov w8, #43691 // =0xaaab
51 ; CHECK-NEXT: movk w8, #43690, lsl #16
52 ; CHECK-NEXT: sub v0.4s, v0.4s, v1.4s
53 ; CHECK-NEXT: dup v1.4s, w8
54 ; CHECK-NEXT: mov w8, #43690 // =0xaaaa
55 ; CHECK-NEXT: movk w8, #10922, lsl #16
56 ; CHECK-NEXT: mul v0.4s, v0.4s, v1.4s
57 ; CHECK-NEXT: shl v1.4s, v0.4s, #31
58 ; CHECK-NEXT: usra v1.4s, v0.4s, #1
59 ; CHECK-NEXT: dup v0.4s, w8
60 ; CHECK-NEXT: cmhs v0.4s, v0.4s, v1.4s
61 ; CHECK-NEXT: xtn v0.4h, v0.4s
63 %urem = urem <4 x i32> %X, <i32 6, i32 6, i32 6, i32 6>
64 %cmp = icmp eq <4 x i32> %urem, <i32 0, i32 1, i32 2, i32 3>
68 define <4 x i1> @t32_6_part1(<4 x i32> %X) nounwind {
69 ; CHECK-LABEL: t32_6_part1:
71 ; CHECK-NEXT: adrp x8, .LCPI3_0
72 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI3_0]
73 ; CHECK-NEXT: mov w8, #43691 // =0xaaab
74 ; CHECK-NEXT: movk w8, #43690, lsl #16
75 ; CHECK-NEXT: sub v0.4s, v0.4s, v1.4s
76 ; CHECK-NEXT: dup v1.4s, w8
77 ; CHECK-NEXT: adrp x8, .LCPI3_1
78 ; CHECK-NEXT: mul v0.4s, v0.4s, v1.4s
79 ; CHECK-NEXT: shl v1.4s, v0.4s, #31
80 ; CHECK-NEXT: usra v1.4s, v0.4s, #1
81 ; CHECK-NEXT: ldr q0, [x8, :lo12:.LCPI3_1]
82 ; CHECK-NEXT: cmhs v0.4s, v0.4s, v1.4s
83 ; CHECK-NEXT: xtn v0.4h, v0.4s
85 %urem = urem <4 x i32> %X, <i32 6, i32 6, i32 6, i32 6>
86 %cmp = icmp eq <4 x i32> %urem, <i32 4, i32 5, i32 0, i32 0>
90 define <4 x i1> @t32_tautological(<4 x i32> %X) nounwind {
91 ; CHECK-LABEL: t32_tautological:
93 ; CHECK-NEXT: adrp x8, .LCPI4_0
94 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI4_0]
95 ; CHECK-NEXT: mov w8, #43691 // =0xaaab
96 ; CHECK-NEXT: movk w8, #43690, lsl #16
97 ; CHECK-NEXT: sub v0.4s, v0.4s, v1.4s
98 ; CHECK-NEXT: dup v1.4s, w8
99 ; CHECK-NEXT: adrp x8, .LCPI4_1
100 ; CHECK-NEXT: mul v0.4s, v0.4s, v1.4s
101 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI4_1]
102 ; CHECK-NEXT: cmhs v0.4s, v1.4s, v0.4s
103 ; CHECK-NEXT: movi d1, #0x00ffffffff0000
104 ; CHECK-NEXT: xtn v0.4h, v0.4s
105 ; CHECK-NEXT: eor v0.8b, v0.8b, v1.8b
107 %urem = urem <4 x i32> %X, <i32 1, i32 1, i32 2, i32 3>
108 %cmp = icmp eq <4 x i32> %urem, <i32 0, i32 1, i32 2, i32 2>