1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64-unknown-unknown | FileCheck %s
4 ; These two forms are equivalent:
7 ; Some targets may prefer one to the other.
9 define i8 @scalar_i8(i8 %x, i8 %y) nounwind {
10 ; CHECK-LABEL: scalar_i8:
12 ; CHECK-NEXT: add w8, w0, w1
13 ; CHECK-NEXT: add w0, w8, #1
20 define i16 @scalar_i16(i16 %x, i16 %y) nounwind {
21 ; CHECK-LABEL: scalar_i16:
23 ; CHECK-NEXT: add w8, w0, w1
24 ; CHECK-NEXT: add w0, w8, #1
31 define i32 @scalar_i32(i32 %x, i32 %y) nounwind {
32 ; CHECK-LABEL: scalar_i32:
34 ; CHECK-NEXT: add w8, w0, w1
35 ; CHECK-NEXT: add w0, w8, #1
42 define i64 @scalar_i64(i64 %x, i64 %y) nounwind {
43 ; CHECK-LABEL: scalar_i64:
45 ; CHECK-NEXT: add x8, x0, x1
46 ; CHECK-NEXT: add x0, x8, #1
53 define <16 x i8> @vector_i128_i8(<16 x i8> %x, <16 x i8> %y) nounwind {
54 ; CHECK-LABEL: vector_i128_i8:
56 ; CHECK-NEXT: mvn v0.16b, v0.16b
57 ; CHECK-NEXT: sub v0.16b, v1.16b, v0.16b
59 %t0 = add <16 x i8> %x, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
60 %t1 = add <16 x i8> %y, %t0
64 define <8 x i16> @vector_i128_i16(<8 x i16> %x, <8 x i16> %y) nounwind {
65 ; CHECK-LABEL: vector_i128_i16:
67 ; CHECK-NEXT: mvn v0.16b, v0.16b
68 ; CHECK-NEXT: sub v0.8h, v1.8h, v0.8h
70 %t0 = add <8 x i16> %x, <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>
71 %t1 = add <8 x i16> %y, %t0
75 define <4 x i32> @vector_i128_i32(<4 x i32> %x, <4 x i32> %y) nounwind {
76 ; CHECK-LABEL: vector_i128_i32:
78 ; CHECK-NEXT: mvn v0.16b, v0.16b
79 ; CHECK-NEXT: sub v0.4s, v1.4s, v0.4s
81 %t0 = add <4 x i32> %x, <i32 1, i32 1, i32 1, i32 1>
82 %t1 = add <4 x i32> %y, %t0
86 define <2 x i64> @vector_i128_i64(<2 x i64> %x, <2 x i64> %y) nounwind {
87 ; CHECK-LABEL: vector_i128_i64:
89 ; CHECK-NEXT: mvn v0.16b, v0.16b
90 ; CHECK-NEXT: sub v0.2d, v1.2d, v0.2d
92 %t0 = add <2 x i64> %x, <i64 1, i64 1>
93 %t1 = add <2 x i64> %y, %t0