Xamarin Public Jenkins (auto-signing) 64ac736ec5 Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
2019-04-12 14:10:50 +00:00

33 lines
613 B
LLVM

; 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
}