1 ; RUN: llc -mtriple=arm-eabi -float-abi=soft -mattr=+vfp2 %s -o - | FileCheck %s
3 define void @func_02(i32 %rm) {
4 call void @llvm.set.rounding(i32 %rm)
8 ; CHECK-LABEL: func_02:
9 ; CHECK: vmrs r1, fpscr
10 ; CHECK: sub r0, r0, #1
11 ; CHECK: and r0, r0, #3
12 ; CHECK: bic r1, r1, #12582912
13 ; CHECK: orr r0, r1, r0, lsl #22
14 ; CHECK: vmsr fpscr, r0
18 define void @func_03() {
19 call void @llvm.set.rounding(i32 0)
23 ; CHECK-LABEL: func_03
24 ; CHECK: vmrs r0, fpscr
25 ; CHECK: orr r0, r0, #12582912
26 ; CHECK: vmsr fpscr, r0
30 define void @func_04() {
31 call void @llvm.set.rounding(i32 1)
35 ; CHECK-LABEL: func_04
36 ; CHECK: vmrs r0, fpscr
37 ; CHECK: bic r0, r0, #12582912
38 ; CHECK: vmsr fpscr, r0
42 define void @func_05() {
43 call void @llvm.set.rounding(i32 2)
48 ; CHECK-LABEL: func_05
49 ; CHECK: vmrs r0, fpscr
50 ; CHECK: bic r0, r0, #12582912
51 ; CHECK: orr r0, r0, #4194304
52 ; CHECK: vmsr fpscr, r0
56 define void @func_06() {
57 call void @llvm.set.rounding(i32 3)
61 ; CHECK-LABEL: func_06
62 ; CHECK: vmrs r0, fpscr
63 ; CHECK: bic r0, r0, #12582912
64 ; CHECK: orr r0, r0, #8388608
65 ; CHECK: vmsr fpscr, r0
69 declare void @llvm.set.rounding(i32)