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
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
11
%0 = sitofp i32 %a to double
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
21
%0 = load i32, i32* %a
22
%1 = sitofp i32 %0 to double
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
32
%0 = sitofp i32 %a to float
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
42
%0 = load i32, i32* %a
43
%1 = sitofp i32 %0 to float