1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64-- | FileCheck %s
4 define i32 @PR39657(ptr %p, i64 %x) {
5 ; CHECK-LABEL: PR39657:
7 ; CHECK-NEXT: mvn x8, x1
8 ; CHECK-NEXT: ldr w0, [x0, x8, lsl #2]
11 %mul = xor i64 %sh, -4
12 %add.ptr = getelementptr inbounds i8, ptr %p, i64 %mul
13 %load = load i32, ptr %add.ptr, align 4
17 define i32 @add_of_not(i32 %x, i32 %y) {
18 ; CHECK-LABEL: add_of_not:
20 ; CHECK-NEXT: mvn w8, w1
21 ; CHECK-NEXT: add w0, w8, w0
28 define i32 @add_of_not_decrement(i32 %x, i32 %y) {
29 ; CHECK-LABEL: add_of_not_decrement:
31 ; CHECK-NEXT: mvn w8, w1
32 ; CHECK-NEXT: add w0, w8, w0
39 define <4 x i32> @vec_add_of_not(<4 x i32> %x, <4 x i32> %y) {
40 ; CHECK-LABEL: vec_add_of_not:
42 ; CHECK-NEXT: mvn v1.16b, v1.16b
43 ; CHECK-NEXT: add v0.4s, v1.4s, v0.4s
45 %t0 = sub <4 x i32> %x, %y
46 %r = add <4 x i32> %t0, <i32 -1, i32 -1, i32 -1, i32 -1>
50 define <4 x i32> @vec_add_of_not_decrement(<4 x i32> %x, <4 x i32> %y) {
51 ; CHECK-LABEL: vec_add_of_not_decrement:
53 ; CHECK-NEXT: mvn v1.16b, v1.16b
54 ; CHECK-NEXT: add v0.4s, v1.4s, v0.4s
56 %t0 = sub <4 x i32> %x, %y
57 %r = sub <4 x i32> %t0, <i32 1, i32 1, i32 1, i32 1>
61 define <4 x i32> @vec_add_of_not_with_undef(<4 x i32> %x, <4 x i32> %y) {
62 ; CHECK-LABEL: vec_add_of_not_with_undef:
64 ; CHECK-NEXT: movi v2.2d, #0xffffffffffffffff
65 ; CHECK-NEXT: sub v0.4s, v0.4s, v1.4s
66 ; CHECK-NEXT: add v0.4s, v0.4s, v2.4s
68 %t0 = sub <4 x i32> %x, %y
69 %r = add <4 x i32> %t0, <i32 -1, i32 undef, i32 -1, i32 -1>
73 define <4 x i32> @vec_add_of_not_with_undef_decrement(<4 x i32> %x, <4 x i32> %y) {
74 ; CHECK-LABEL: vec_add_of_not_with_undef_decrement:
76 ; CHECK-NEXT: movi v2.4s, #1
77 ; CHECK-NEXT: sub v0.4s, v0.4s, v1.4s
78 ; CHECK-NEXT: add v0.4s, v0.4s, v2.4s
80 %t0 = sub <4 x i32> %x, %y
81 %r = add <4 x i32> %t0, <i32 1, i32 undef, i32 1, i32 1>