reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
; RUN: llc -mtriple=armv8-eabi %s -o - | FileCheck %s

; CHECK-LABEL: rbit
; CHECK: rbit r0, r0
define i32 @rbit(i32 %t) {
entry:
  %rbit = call i32 @llvm.arm.rbit(i32 %t)
  ret i32 %rbit
}

; CHECK-LABEL: rbit_constant
; CHECK: mov r0, #0
; CHECK-NOT: rbit
; CHECK: bx lr
define i32 @rbit_constant() {
entry:
  %rbit.i = call i32 @llvm.arm.rbit(i32 0)
  ret i32 %rbit.i
}

declare i32 @llvm.arm.rbit(i32)

declare i32 @llvm.bitreverse.i32(i32) readnone

; CHECK-LABEL: rbit_generic
; CHECK: rbit r0, r0
define i32 @rbit_generic(i32 %t) {
entry:
  %rbit = call i32 @llvm.bitreverse.i32(i32 %t)
  ret i32 %rbit
}