blob: d226b48cb20f3dfdb4f4c1c82b863d6c97cc7c22 [file] [log] [blame]
Akira Hatanakafce4dd72013-05-16 19:57:23 +00001; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=32
Daniel Sanders1d3ae272014-04-14 16:00:28 +00002; RUN: llc -march=mips64el -mcpu=mips4 < %s | FileCheck %s -check-prefix=64
Akira Hatanakafce4dd72013-05-16 19:57:23 +00003; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s -check-prefix=64
4
5@i1 = global [3 x i32] [i32 1, i32 2, i32 3], align 4
6@i3 = common global i32* null, align 4
7
Stephen Linf799e3f2013-07-13 20:38:47 +00008; 32-LABEL: test_float_int_:
Akira Hatanakafce4dd72013-05-16 19:57:23 +00009; 32: mtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
10; 32: cvt.s.w $f{{[0-9]+}}, $f[[R0]]
11
12define float @test_float_int_(i32 %a) {
13entry:
14 %conv = sitofp i32 %a to float
15 ret float %conv
16}
17
Stephen Linf799e3f2013-07-13 20:38:47 +000018; 32-LABEL: test_double_int_:
Akira Hatanakafce4dd72013-05-16 19:57:23 +000019; 32: mtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
20; 32: cvt.d.w $f{{[0-9]+}}, $f[[R0]]
Stephen Linf799e3f2013-07-13 20:38:47 +000021; 64-LABEL: test_double_int_:
Akira Hatanakafce4dd72013-05-16 19:57:23 +000022; 64: mtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
23; 64: cvt.d.w $f{{[0-9]+}}, $f[[R0]]
24
25define double @test_double_int_(i32 %a) {
26entry:
27 %conv = sitofp i32 %a to double
28 ret double %conv
29}
30
Stephen Linf799e3f2013-07-13 20:38:47 +000031; 64-LABEL: test_float_LL_:
Akira Hatanakafce4dd72013-05-16 19:57:23 +000032; 64: dmtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
33; 64: cvt.s.l $f{{[0-9]+}}, $f[[R0]]
34
35define float @test_float_LL_(i64 %a) {
36entry:
37 %conv = sitofp i64 %a to float
38 ret float %conv
39}
40
Stephen Linf799e3f2013-07-13 20:38:47 +000041; 64-LABEL: test_double_LL_:
Akira Hatanakafce4dd72013-05-16 19:57:23 +000042; 64: dmtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
43; 64: cvt.d.l $f{{[0-9]+}}, $f[[R0]]
44
45define double @test_double_LL_(i64 %a) {
46entry:
47 %conv = sitofp i64 %a to double
48 ret double %conv
49}