Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc -mtriple=armv8-eabi %s -o - | FileCheck %s
      2 
      3 ; CHECK-LABEL: rbit
      4 ; CHECK: rbit r0, r0
      5 define i32 @rbit(i32 %t) {
      6 entry:
      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
     14 define i32 @rbit_constant() {
     15 entry:
     16   %rbit.i = call i32 @llvm.arm.rbit(i32 0)
     17   ret i32 %rbit.i
     18 }
     19 
     20 declare i32 @llvm.arm.rbit(i32)
     21 
     22 declare i32 @llvm.bitreverse.i32(i32) readnone
     23 
     24 ; CHECK-LABEL: rbit_generic
     25 ; CHECK: rbit r0, r0
     26 define i32 @rbit_generic(i32 %t) {
     27 entry:
     28   %rbit = call i32 @llvm.bitreverse.i32(i32 %t)
     29   ret i32 %rbit
     30 }
     31 
     32