• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=armv8-eabi %s -o - | FileCheck %s
2
3; CHECK-LABEL: rbit
4; CHECK: rbit r0, r0
5define i32 @rbit(i32 %t) {
6entry:
7  %rbit = call i32 @llvm.arm.rbit(i32 %t)
8  ret i32 %rbit
9}
10
11; CHECK-LABEL: rbit_constant
12; CHECK: mov r0, #0
13; CHECK: rbit r0, r0
14define i32 @rbit_constant() {
15entry:
16  %rbit.i = call i32 @llvm.arm.rbit(i32 0)
17  ret i32 %rbit.i
18}
19
20declare i32 @llvm.arm.rbit(i32)
21
22declare i32 @llvm.bitreverse.i32(i32) readnone
23
24; CHECK-LABEL: rbit_generic
25; CHECK: rbit r0, r0
26define i32 @rbit_generic(i32 %t) {
27entry:
28  %rbit = call i32 @llvm.bitreverse.i32(i32 %t)
29  ret i32 %rbit
30}
31
32