~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/Mips/int-to-float-conversion.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=32
 
2
; RUN: llc -march=mips64el -mcpu=mips4 < %s | FileCheck %s -check-prefix=64
 
3
; 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
 
 
8
; 32-LABEL: test_float_int_:
 
9
; 32: mtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
 
10
; 32: cvt.s.w $f{{[0-9]+}}, $f[[R0]]
 
11
 
 
12
define float @test_float_int_(i32 %a) {
 
13
entry:
 
14
  %conv = sitofp i32 %a to float
 
15
  ret float %conv
 
16
}
 
17
 
 
18
; 32-LABEL: test_double_int_:
 
19
; 32: mtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
 
20
; 32: cvt.d.w $f{{[0-9]+}}, $f[[R0]]
 
21
; 64-LABEL: test_double_int_:
 
22
; 64: mtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
 
23
; 64: cvt.d.w $f{{[0-9]+}}, $f[[R0]]
 
24
 
 
25
define double @test_double_int_(i32 %a) {
 
26
entry:
 
27
  %conv = sitofp i32 %a to double
 
28
  ret double %conv
 
29
}
 
30
 
 
31
; 64-LABEL: test_float_LL_:
 
32
; 64: dmtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
 
33
; 64: cvt.s.l $f{{[0-9]+}}, $f[[R0]]
 
34
 
 
35
define float @test_float_LL_(i64 %a) {
 
36
entry:
 
37
  %conv = sitofp i64 %a to float
 
38
  ret float %conv
 
39
}
 
40
 
 
41
; 64-LABEL: test_double_LL_:
 
42
; 64: dmtc1 ${{[0-9]+}}, $f[[R0:[0-9]+]]
 
43
; 64: cvt.d.l $f{{[0-9]+}}, $f[[R0]]
 
44
 
 
45
define double @test_double_LL_(i64 %a) {
 
46
entry:
 
47
  %conv = sitofp i64 %a to double
 
48
  ret double %conv
 
49
}