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 3 4 5define 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 9; ALL-NEXT: retq 10entry: 11 %0 = uitofp i64 %a to double 12 ret double %0 13} 14 15define double @long_to_double_rm(ptr %a) { 16; ALL-LABEL: long_to_double_rm: 17; ALL: # %bb.0: # %entry 18; ALL-NEXT: vcvtusi2sdq (%rdi), %xmm0, %xmm0 19; ALL-NEXT: retq 20entry: 21 %0 = load i64, ptr %a 22 %1 = uitofp i64 %0 to double 23 ret double %1 24} 25 26define double @long_to_double_rm_optsize(ptr %a) optsize { 27; ALL-LABEL: long_to_double_rm_optsize: 28; ALL: # %bb.0: # %entry 29; ALL-NEXT: vcvtusi2sdq (%rdi), %xmm0, %xmm0 30; ALL-NEXT: retq 31entry: 32 %0 = load i64, ptr %a 33 %1 = uitofp i64 %0 to double 34 ret double %1 35} 36 37define 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 41; ALL-NEXT: retq 42entry: 43 %0 = uitofp i64 %a to float 44 ret float %0 45} 46 47define float @long_to_float_rm(ptr %a) { 48; ALL-LABEL: long_to_float_rm: 49; ALL: # %bb.0: # %entry 50; ALL-NEXT: vcvtusi2ssq (%rdi), %xmm0, %xmm0 51; ALL-NEXT: retq 52entry: 53 %0 = load i64, ptr %a 54 %1 = uitofp i64 %0 to float 55 ret float %1 56} 57 58define float @long_to_float_rm_optsize(ptr %a) optsize { 59; ALL-LABEL: long_to_float_rm_optsize: 60; ALL: # %bb.0: # %entry 61; ALL-NEXT: vcvtusi2ssq (%rdi), %xmm0, %xmm0 62; ALL-NEXT: retq 63entry: 64 %0 = load i64, ptr %a 65 %1 = uitofp i64 %0 to float 66 ret float %1 67} 68