mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
dece4f91fe
Differential Revision: https://reviews.llvm.org/D96836
71 lines
1.4 KiB
LLVM
71 lines
1.4 KiB
LLVM
; RUN: llc -mtriple=aarch64-none-linux-gnu %s -o - | FileCheck %s
|
|
|
|
define void @func_02(i32 %rm) {
|
|
call void @llvm.set.rounding(i32 %rm)
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: func_02:
|
|
; CHECK: sub w9, w0, #1
|
|
; CHECK: mrs x8, FPCR
|
|
; CHECK: and w9, w9, #0x3
|
|
; CHECK: and x8, x8, #0xffffffffff3fffff
|
|
; CHECK: lsl w9, w9, #22
|
|
; CHECK: orr x8, x8, x9
|
|
; CHECK: msr FPCR, x8
|
|
; CHECK: ret
|
|
|
|
|
|
define void @func_03() {
|
|
call void @llvm.set.rounding(i32 0)
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: func_03
|
|
; CHECK: mrs x8, FPCR
|
|
; CHECK: orr x8, x8, #0xc00000
|
|
; CHECK: msr FPCR, x8
|
|
; CHECK: ret
|
|
|
|
|
|
define void @func_04() {
|
|
call void @llvm.set.rounding(i32 1)
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: func_04
|
|
; CHECK: mrs x8, FPCR
|
|
; CHECK: and x8, x8, #0xffffffffff3fffff
|
|
; CHECK: msr FPCR, x8
|
|
; CHECK: ret
|
|
|
|
|
|
define void @func_05() {
|
|
call void @llvm.set.rounding(i32 2)
|
|
ret void
|
|
}
|
|
|
|
|
|
; CHECK-LABEL: func_05
|
|
; CHECK: mrs x8, FPCR
|
|
; CHECK: and x8, x8, #0xffffffffff3fffff
|
|
; CHECK: orr x8, x8, #0x400000
|
|
; CHECK: msr FPCR, x8
|
|
; CHECK: ret
|
|
|
|
|
|
define void @func_06() {
|
|
call void @llvm.set.rounding(i32 3)
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: func_06
|
|
; CHECK: mrs x8, FPCR
|
|
; CHECK: and x8, x8, #0xffffffffff3fffff
|
|
; CHECK: orr x8, x8, #0x800000
|
|
; CHECK: msr FPCR, x8
|
|
; CHECK: ret
|
|
|
|
|
|
declare void @llvm.set.rounding(i32)
|