1 ; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2
2 ; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s -check-prefix=VFP2
3 ; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s -check-prefix=NEON
4 ; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s -check-prefix=VFP2
6 define i32 @test1(float %a, float %b) {
8 ; VFP2: vcvt.s32.f32 s{{.}}, s{{.}}
10 ; NEON: vcvt.s32.f32 d0, d0
12 %0 = fadd float %a, %b
13 %1 = fptosi float %0 to i32
17 define i32 @test2(float %a, float %b) {
19 ; VFP2: vcvt.u32.f32 s{{.}}, s{{.}}
21 ; NEON: vcvt.u32.f32 d0, d0
23 %0 = fadd float %a, %b
24 %1 = fptoui float %0 to i32
28 define float @test3(i32 %a, i32 %b) {
30 ; VFP2: vcvt.f32.u32 s{{.}}, s{{.}}
32 ; NEON: vcvt.f32.u32 d0, d0
35 %1 = uitofp i32 %0 to float
39 define float @test4(i32 %a, i32 %b) {
41 ; VFP2: vcvt.f32.s32 s{{.}}, s{{.}}
43 ; NEON: vcvt.f32.s32 d0, d0
46 %1 = sitofp i32 %0 to float