1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple aarch64-none-linux-gnu < %s | FileCheck %s
4 declare <4 x i16> @llvm.aarch64.neon.uaddlp.v4i16.v8i8(<8 x i8>) nounwind readnone
5 declare <8 x i16> @llvm.aarch64.neon.uaddlp.v8i16.v16i8(<16 x i8>) nounwind readnone
6 declare <4 x i32> @llvm.aarch64.neon.uaddlp.v4i32.v8i16(<8 x i16>) nounwind readnone
7 declare <2 x i64> @llvm.aarch64.neon.uaddlp.v2i64.v4i32(<4 x i32>) nounwind readnone
8 declare <2 x i32> @llvm.aarch64.neon.uaddlp.v2i32.v4i16(<4 x i16>) nounwind readnone
10 declare i16 @llvm.vector.reduce.add.v4i16(<4 x i16>) nounwind readnone
11 declare i16 @llvm.vector.reduce.add.v8i16(<8 x i16>) nounwind readnone
12 declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) nounwind readnone
13 declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) nounwind readnone
14 declare i32 @llvm.vector.reduce.add.v2i32(<2 x i32>) nounwind readnone
16 define i16 @uaddlv4h_from_v8i8(<8 x i8>* %A) nounwind {
17 ; CHECK-LABEL: uaddlv4h_from_v8i8:
19 ; CHECK-NEXT: ldr d0, [x0]
20 ; CHECK-NEXT: uaddlv s0, v0.4h
21 ; CHECK-NEXT: fmov w0, s0
23 %tmp1 = load <8 x i8>, <8 x i8>* %A
24 %tmp3 = call <4 x i16> @llvm.aarch64.neon.uaddlp.v4i16.v8i8(<8 x i8> %tmp1)
25 %tmp5 = call i16 @llvm.vector.reduce.add.v4i16(<4 x i16> %tmp3)
29 define i16 @uaddlv16b_from_v16i8(<16 x i8>* %A) nounwind {
30 ; CHECK-LABEL: uaddlv16b_from_v16i8:
32 ; CHECK-NEXT: ldr q0, [x0]
33 ; CHECK-NEXT: uaddlv h0, v0.16b
34 ; CHECK-NEXT: fmov w0, s0
36 %tmp1 = load <16 x i8>, <16 x i8>* %A
37 %tmp3 = call <8 x i16> @llvm.aarch64.neon.uaddlp.v8i16.v16i8(<16 x i8> %tmp1)
38 %tmp5 = call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> %tmp3)
42 define i32 @uaddlv8h_from_v8i16(<8 x i16>* %A) nounwind {
43 ; CHECK-LABEL: uaddlv8h_from_v8i16:
45 ; CHECK-NEXT: ldr q0, [x0]
46 ; CHECK-NEXT: uaddlv s0, v0.8h
47 ; CHECK-NEXT: fmov w0, s0
49 %tmp1 = load <8 x i16>, <8 x i16>* %A
50 %tmp3 = call <4 x i32> @llvm.aarch64.neon.uaddlp.v4i32.v8i16(<8 x i16> %tmp1)
51 %tmp5 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %tmp3)
55 define i64 @uaddlv4s_from_v4i32(<4 x i32>* %A) nounwind {
56 ; CHECK-LABEL: uaddlv4s_from_v4i32:
58 ; CHECK-NEXT: ldr q0, [x0]
59 ; CHECK-NEXT: uaddlv d0, v0.4s
60 ; CHECK-NEXT: fmov x0, d0
62 %tmp1 = load <4 x i32>, <4 x i32>* %A
63 %tmp3 = call <2 x i64> @llvm.aarch64.neon.uaddlp.v2i64.v4i32(<4 x i32> %tmp1)
64 %tmp5 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %tmp3)
68 define i32 @uaddlv4h_from_v4i16(<4 x i16>* %A) nounwind {
69 ; CHECK-LABEL: uaddlv4h_from_v4i16:
71 ; CHECK-NEXT: ldr d0, [x0]
72 ; CHECK-NEXT: uaddlv s0, v0.4h
73 ; CHECK-NEXT: fmov w0, s0
75 %tmp1 = load <4 x i16>, <4 x i16>* %A
76 %tmp3 = call <2 x i32> @llvm.aarch64.neon.uaddlp.v2i32.v4i16(<4 x i16> %tmp1)
77 %tmp5 = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> %tmp3)