1 ; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=32
2 ; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s -check-prefix=64
4 @i1 = global [3 x i32] [i32 1, i32 2, i32 3], align 4
5 @i3 = common global i32* null, align 4
7 ; 32-LABEL: test_float_int_:
8 ; 32: mtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
9 ; 32: cvt.s.w $f{{[0-9]+}}, $f[[R0]]
11 define float @test_float_int_(i32 %a) {
13 %conv = sitofp i32 %a to float
17 ; 32-LABEL: test_double_int_:
18 ; 32: mtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
19 ; 32: cvt.d.w $f{{[0-9]+}}, $f[[R0]]
20 ; 64-LABEL: test_double_int_:
21 ; 64: mtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
22 ; 64: cvt.d.w $f{{[0-9]+}}, $f[[R0]]
24 define double @test_double_int_(i32 %a) {
26 %conv = sitofp i32 %a to double
30 ; 64-LABEL: test_float_LL_:
31 ; 64: dmtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
32 ; 64: cvt.s.l $f{{[0-9]+}}, $f[[R0]]
34 define float @test_float_LL_(i64 %a) {
36 %conv = sitofp i64 %a to float
40 ; 64-LABEL: test_double_LL_:
41 ; 64: dmtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
42 ; 64: cvt.d.l $f{{[0-9]+}}, $f[[R0]]
44 define double @test_double_LL_(i64 %a) {
46 %conv = sitofp i64 %a to double