1 ; RUN: llc -mtriple=aarch64-eabi %s -o - | FileCheck %s
3 ; The llvm.aarch64.rbit intrinsic should be auto-upgraded to the
4 ; target-independent bitreverse intrinsic.
8 define i32 @rbit32(i32 %t) {
10 %rbit.i = call i32 @llvm.aarch64.rbit.i32(i32 %t)
16 define i64 @rbit64(i64 %t) {
18 %rbit.i = call i64 @llvm.aarch64.rbit.i64(i64 %t)
22 declare i64 @llvm.aarch64.rbit.i64(i64)
23 declare i32 @llvm.aarch64.rbit.i32(i32)
25 ; CHECK-LABEL: rbit_generic32
27 define i32 @rbit_generic32(i32 %t) {
29 %rbit = call i32 @llvm.bitreverse.i32(i32 %t)
33 ; CHECK-LABEL: rbit_generic64
35 define i64 @rbit_generic64(i64 %t) {
37 %rbit = call i64 @llvm.bitreverse.i64(i64 %t)
41 declare i32 @llvm.bitreverse.i32(i32) readnone
42 declare i64 @llvm.bitreverse.i64(i64) readnone