1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64 -mattr=+fullfp16 %s -o - | FileCheck %s
4 ; The llvm.aarch64_neon_rbit intrinsic should be auto-upgraded to the
5 ; target-independent bitreverse intrinsic.
7 declare <8 x i8> @llvm.aarch64.neon.rbit.v8i8(<8 x i8>) nounwind readnone
9 define <8 x i8> @rbit_8x8(<8 x i8> %A) nounwind {
10 ; CHECK-LABEL: rbit_8x8:
12 ; CHECK-NEXT: rbit v0.8b, v0.8b
14 %tmp3 = call <8 x i8> @llvm.aarch64.neon.rbit.v8i8(<8 x i8> %A)
18 declare <16 x i8> @llvm.aarch64.neon.rbit.v16i8(<16 x i8>) nounwind readnone
20 define <16 x i8> @rbit_16x8(<16 x i8> %A) nounwind {
21 ; CHECK-LABEL: rbit_16x8:
23 ; CHECK-NEXT: rbit v0.16b, v0.16b
25 %tmp3 = call <16 x i8> @llvm.aarch64.neon.rbit.v16i8(<16 x i8> %A)
29 declare <4 x i16> @llvm.aarch64.neon.rbit.v4i16(<4 x i16>) nounwind readnone
31 define <4 x i16> @rbit_4x16(<4 x i16> %A) nounwind {
32 ; CHECK-LABEL: rbit_4x16:
34 ; CHECK-NEXT: rev16 v0.8b, v0.8b
35 ; CHECK-NEXT: rbit v0.8b, v0.8b
37 %tmp3 = call <4 x i16> @llvm.aarch64.neon.rbit.v4i16(<4 x i16> %A)
41 declare <8 x i16> @llvm.aarch64.neon.rbit.v8i16(<8 x i16>) nounwind readnone
43 define <8 x i16> @rbit_8x16(<8 x i16> %A) {
44 ; CHECK-LABEL: rbit_8x16:
46 ; CHECK-NEXT: rev16 v0.16b, v0.16b
47 ; CHECK-NEXT: rbit v0.16b, v0.16b
49 %tmp3 = call <8 x i16> @llvm.aarch64.neon.rbit.v8i16(<8 x i16> %A)
53 declare <2 x i32> @llvm.aarch64.neon.rbit.v2i32(<2 x i32>) nounwind readnone
55 define <2 x i32> @rbit_2x32(<2 x i32> %A) {
56 ; CHECK-LABEL: rbit_2x32:
58 ; CHECK-NEXT: rev32 v0.8b, v0.8b
59 ; CHECK-NEXT: rbit v0.8b, v0.8b
61 %tmp3 = call <2 x i32> @llvm.aarch64.neon.rbit.v2i32(<2 x i32> %A)
65 declare <4 x i32> @llvm.aarch64.neon.rbit.v4i32(<4 x i32>) nounwind readnone
67 define <4 x i32> @rbit_4x32(<4 x i32> %A) {
68 ; CHECK-LABEL: rbit_4x32:
70 ; CHECK-NEXT: rev32 v0.16b, v0.16b
71 ; CHECK-NEXT: rbit v0.16b, v0.16b
73 %tmp3 = call <4 x i32> @llvm.aarch64.neon.rbit.v4i32(<4 x i32> %A)
77 declare <1 x i64> @llvm.aarch64.neon.rbit.v1i64(<1 x i64>) readnone
79 define <1 x i64> @rbit_1x64(<1 x i64> %A) {
80 ; CHECK-LABEL: rbit_1x64:
82 ; CHECK-NEXT: rev64 v0.8b, v0.8b
83 ; CHECK-NEXT: rbit v0.8b, v0.8b
85 %tmp3 = call <1 x i64> @llvm.aarch64.neon.rbit.v1i64(<1 x i64> %A)
89 declare <2 x i64> @llvm.aarch64.neon.rbit.v2i64(<2 x i64>) readnone
91 define <2 x i64> @rbit_2x64(<2 x i64> %A) {
92 ; CHECK-LABEL: rbit_2x64:
94 ; CHECK-NEXT: rev64 v0.16b, v0.16b
95 ; CHECK-NEXT: rbit v0.16b, v0.16b
97 %tmp3 = call <2 x i64> @llvm.aarch64.neon.rbit.v2i64(<2 x i64> %A)