1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=x86_64-unknown-unknown -mcpu=generic -mattr=+avx512f -fast-isel --fast-isel-abort=1 < %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX
5 define double @long_to_double_rr(i64 %a) {
6 ; ALL-LABEL: long_to_double_rr:
7 ; ALL: # %bb.0: # %entry
8 ; ALL-NEXT: vcvtusi2sd %rdi, %xmm0, %xmm0
11 %0 = uitofp i64 %a to double
15 define double @long_to_double_rm(i64* %a) {
16 ; ALL-LABEL: long_to_double_rm:
17 ; ALL: # %bb.0: # %entry
18 ; ALL-NEXT: vcvtusi2sdq (%rdi), %xmm0, %xmm0
21 %0 = load i64, i64* %a
22 %1 = uitofp i64 %0 to double
26 define double @long_to_double_rm_optsize(i64* %a) optsize {
27 ; ALL-LABEL: long_to_double_rm_optsize:
28 ; ALL: # %bb.0: # %entry
29 ; ALL-NEXT: vcvtusi2sdq (%rdi), %xmm0, %xmm0
32 %0 = load i64, i64* %a
33 %1 = uitofp i64 %0 to double
37 define float @long_to_float_rr(i64 %a) {
38 ; ALL-LABEL: long_to_float_rr:
39 ; ALL: # %bb.0: # %entry
40 ; ALL-NEXT: vcvtusi2ss %rdi, %xmm0, %xmm0
43 %0 = uitofp i64 %a to float
47 define float @long_to_float_rm(i64* %a) {
48 ; ALL-LABEL: long_to_float_rm:
49 ; ALL: # %bb.0: # %entry
50 ; ALL-NEXT: vcvtusi2ssq (%rdi), %xmm0, %xmm0
53 %0 = load i64, i64* %a
54 %1 = uitofp i64 %0 to float
58 define float @long_to_float_rm_optsize(i64* %a) optsize {
59 ; ALL-LABEL: long_to_float_rm_optsize:
60 ; ALL: # %bb.0: # %entry
61 ; ALL-NEXT: vcvtusi2ssq (%rdi), %xmm0, %xmm0
64 %0 = load i64, i64* %a
65 %1 = uitofp i64 %0 to float