1 ; RUN: llc -mtriple=arm-eabi -mattr=+vfp2 %s -o - \
2 ; RUN: | FileCheck %s -check-prefix=VFP2
4 ; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - \
5 ; RUN: | FileCheck %s -check-prefix=VFP2
7 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 %s -o - \
8 ; RUN: | FileCheck %s -check-prefix=VFP2
10 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 --enable-unsafe-fp-math %s -o - \
11 ; RUN: | FileCheck %s -check-prefix=NEON
13 ; RUN: llc -mtriple=arm-darwin -mcpu=cortex-a8 %s -o - \
14 ; RUN: | FileCheck %s -check-prefix=NEON
16 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a9 %s -o - \
17 ; RUN: | FileCheck %s -check-prefix=VFP2
19 define i32 @test1(float %a, float %b) {
21 ; VFP2: vcvt.s32.f32 s{{.}}, s{{.}}
23 ; NEON: vadd.f32 [[D0:d[0-9]+]]
24 ; NEON: vcvt.s32.f32 d0, [[D0]]
26 %0 = fadd float %a, %b
27 %1 = fptosi float %0 to i32
31 define i32 @test2(float %a, float %b) {
33 ; VFP2: vcvt.u32.f32 s{{.}}, s{{.}}
35 ; NEON: vadd.f32 [[D0:d[0-9]+]]
36 ; NEON: vcvt.u32.f32 d0, [[D0]]
38 %0 = fadd float %a, %b
39 %1 = fptoui float %0 to i32
43 define float @test3(i32 %a, i32 %b) {
45 ; VFP2: vcvt.f32.u32 s{{.}}, s{{.}}
47 ; NEON: vcvt.f32.u32 d
50 %1 = uitofp i32 %0 to float
54 define float @test4(i32 %a, i32 %b) {
56 ; VFP2: vcvt.f32.s32 s{{.}}, s{{.}}
58 ; NEON: vcvt.f32.s32 d
61 %1 = sitofp i32 %0 to float