1 ; RUN: llc < %s -O0 -mtriple=armv7-eabi -mcpu=cortex-a8 -mattr=+neon,+fp-armv8 | FileCheck %s
2 ; RUN: llc < %s -O3 -mtriple=armv7-eabi -mcpu=cortex-a8 -mattr=+neon,+fp-armv8 | FileCheck %s
4 @a = common global double 0.000000e+00, align 8
6 ; Function Attrs: noinline nounwind uwtable
7 define void @strtod() {
9 ; CHECK: vmrs r{{[0-9]+}}, fpscr
10 %0 = call i32 @llvm.flt.rounds()
11 %tobool = icmp ne i32 %0, 0
12 br i1 %tobool, label %if.then, label %if.end
14 if.then: ; preds = %entry
15 store double 5.000000e-01, double* @a, align 8
18 if.end: ; preds = %if.then, %entry
22 ; Function Attrs: nounwind
23 define void @fn1(i32* nocapture %p) local_unnamed_addr {
25 ; CHECK: vmrs r{{[0-9]+}}, fpscr
26 %0 = tail call i32 @llvm.arm.get.fpscr()
27 store i32 %0, i32* %p, align 4
28 ; CHECK: vmsr fpscr, r{{[0-9]+}}
29 tail call void @llvm.arm.set.fpscr(i32 1)
30 ; CHECK: vmrs r{{[0-9]+}}, fpscr
31 %1 = tail call i32 @llvm.arm.get.fpscr()
32 %arrayidx1 = getelementptr inbounds i32, i32* %p, i32 1
33 store i32 %1, i32* %arrayidx1, align 4
37 ; Function Attrs: nounwind readonly
38 declare i32 @llvm.arm.get.fpscr()
40 ; Function Attrs: nounwind writeonly
41 declare void @llvm.arm.set.fpscr(i32)
43 ; Function Attrs: nounwind
44 declare i32 @llvm.flt.rounds()