32 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-- -mattr=+avx512fp16 | FileCheck %s --check-prefixes=X64-AVX512FP163 4; This should do a single load into the fp stack for the return, not diddle with xmm registers.5 6define half @fcmp_select_fp_constants_olt(half %x) nounwind readnone {7; X64-AVX512FP16-LABEL: fcmp_select_fp_constants_olt:8; X64-AVX512FP16: # %bb.0:9; X64-AVX512FP16-NEXT: vmovsh {{.*#+}} xmm1 = [4.2E+1,0.0E+0,0.0E+0,0.0E+0,0.0E+0,0.0E+0,0.0E+0,0.0E+0]10; X64-AVX512FP16-NEXT: vcmpltsh {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %k111; X64-AVX512FP16-NEXT: vmovsh {{.*#+}} xmm0 = [2.3E+1,0.0E+0,0.0E+0,0.0E+0,0.0E+0,0.0E+0,0.0E+0,0.0E+0]12; X64-AVX512FP16-NEXT: vmovsh %xmm1, %xmm0, %xmm0 {%k1}13; X64-AVX512FP16-NEXT: retq14 %c = fcmp olt half %x, -4.015 %r = select i1 %c, half 42.0, half 23.016 ret half %r17}18 19define half @fcmp_select_fp_constants_ogt(half %x) nounwind readnone {20; X64-AVX512FP16-LABEL: fcmp_select_fp_constants_ogt:21; X64-AVX512FP16: # %bb.0:22; X64-AVX512FP16-NEXT: vmovsh {{.*#+}} xmm1 = [4.2E+1,0.0E+0,0.0E+0,0.0E+0,0.0E+0,0.0E+0,0.0E+0,0.0E+0]23; X64-AVX512FP16-NEXT: vcmpgtsh {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %k124; X64-AVX512FP16-NEXT: vmovsh {{.*#+}} xmm0 = [2.3E+1,0.0E+0,0.0E+0,0.0E+0,0.0E+0,0.0E+0,0.0E+0,0.0E+0]25; X64-AVX512FP16-NEXT: vmovsh %xmm1, %xmm0, %xmm0 {%k1}26; X64-AVX512FP16-NEXT: retq27 %c = fcmp ogt half %x, -4.028 %r = select i1 %c, half 42.0, half 23.029 ret half %r30}31 32