1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=arm-eabi -float-abi=soft -mattr=+vfp2 %s -o - | FileCheck %s
4 define void @func_02(i32 %rm) {
5 ; CHECK-LABEL: func_02:
7 ; CHECK-NEXT: vmrs r1, fpscr
8 ; CHECK-NEXT: sub r0, r0, #1
9 ; CHECK-NEXT: and r0, r0, #3
10 ; CHECK-NEXT: bic r1, r1, #12582912
11 ; CHECK-NEXT: orr r0, r1, r0, lsl #22
12 ; CHECK-NEXT: vmsr fpscr, r0
13 ; CHECK-NEXT: mov pc, lr
14 call void @llvm.set.rounding(i32 %rm)
18 define void @func_03() {
19 ; CHECK-LABEL: func_03:
21 ; CHECK-NEXT: vmrs r0, fpscr
22 ; CHECK-NEXT: orr r0, r0, #12582912
23 ; CHECK-NEXT: vmsr fpscr, r0
24 ; CHECK-NEXT: mov pc, lr
25 call void @llvm.set.rounding(i32 0)
29 define void @func_04() {
30 ; CHECK-LABEL: func_04:
32 ; CHECK-NEXT: vmrs r0, fpscr
33 ; CHECK-NEXT: bic r0, r0, #12582912
34 ; CHECK-NEXT: vmsr fpscr, r0
35 ; CHECK-NEXT: mov pc, lr
36 call void @llvm.set.rounding(i32 1)
40 define void @func_05() {
41 ; CHECK-LABEL: func_05:
43 ; CHECK-NEXT: vmrs r0, fpscr
44 ; CHECK-NEXT: bic r0, r0, #12582912
45 ; CHECK-NEXT: orr r0, r0, #4194304
46 ; CHECK-NEXT: vmsr fpscr, r0
47 ; CHECK-NEXT: mov pc, lr
48 call void @llvm.set.rounding(i32 2)
52 define void @func_06() {
53 ; CHECK-LABEL: func_06:
55 ; CHECK-NEXT: vmrs r0, fpscr
56 ; CHECK-NEXT: bic r0, r0, #12582912
57 ; CHECK-NEXT: orr r0, r0, #8388608
58 ; CHECK-NEXT: vmsr fpscr, r0
59 ; CHECK-NEXT: mov pc, lr
60 call void @llvm.set.rounding(i32 3)
65 declare void @llvm.set.rounding(i32)