~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/X86/fast-isel-int-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 -mtriple=x86_64-unknown-unknown -mcpu=generic -mattr=+sse2 -fast-isel --fast-isel-abort=1 < %s | FileCheck %s --check-prefix=ALL --check-prefix=SSE2
 
2
; RUN: llc -mtriple=x86_64-unknown-unknown -mcpu=generic -mattr=+avx -fast-isel --fast-isel-abort=1 < %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX
 
3
 
 
4
 
 
5
define double @int_to_double_rr(i32 %a) {
 
6
; ALL-LABEL: int_to_double_rr:
 
7
; SSE2: cvtsi2sdl %edi, %xmm0
 
8
; AVX: vcvtsi2sdl %edi, %xmm0, %xmm0
 
9
; ALL-NEXT: ret
 
10
entry:
 
11
  %0 = sitofp i32 %a to double
 
12
  ret double %0
 
13
}
 
14
 
 
15
define double @int_to_double_rm(i32* %a) {
 
16
; ALL-LABEL: int_to_double_rm:
 
17
; SSE2: cvtsi2sdl (%rdi), %xmm0
 
18
; AVX: vcvtsi2sdl (%rdi), %xmm0, %xmm0
 
19
; ALL-NEXT: ret
 
20
entry:
 
21
  %0 = load i32, i32* %a
 
22
  %1 = sitofp i32 %0 to double
 
23
  ret double %1
 
24
}
 
25
 
 
26
define float @int_to_float_rr(i32 %a) {
 
27
; ALL-LABEL: int_to_float_rr:
 
28
; SSE2: cvtsi2ssl %edi, %xmm0
 
29
; AVX: vcvtsi2ssl %edi, %xmm0, %xmm0
 
30
; ALL-NEXT: ret
 
31
entry:
 
32
  %0 = sitofp i32 %a to float
 
33
  ret float %0
 
34
}
 
35
 
 
36
define float @int_to_float_rm(i32* %a) {
 
37
; ALL-LABEL: int_to_float_rm:
 
38
; SSE2: cvtsi2ssl (%rdi), %xmm0
 
39
; AVX: vcvtsi2ssl (%rdi), %xmm0, %xmm0
 
40
; ALL-NEXT: ret
 
41
entry:
 
42
  %0 = load i32, i32* %a
 
43
  %1 = sitofp i32 %0 to float
 
44
  ret float %1
 
45
}