1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc < %s -mtriple=x86_64-none-unknown-elf -mattr=+avx512vl | FileCheck %s
4 define half @test1(half %x) {
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: vpextrw $0, %xmm0, %eax
8 ; CHECK-NEXT: vmovd %eax, %xmm0
9 ; CHECK-NEXT: vcvtph2ps %xmm0, %xmm0
10 ; CHECK-NEXT: vucomiss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
11 ; CHECK-NEXT: movl $64512, %ecx # imm = 0xFC00
12 ; CHECK-NEXT: cmoval %eax, %ecx
13 ; CHECK-NEXT: vpinsrw $0, %ecx, %xmm0, %xmm0
16 %cmp2 = fcmp ogt half %x, 0xHFC00
17 %cond.v = select i1 %cmp2, half %x, half 0xHFC00
21 define <8 x half> @test2(<8 x half> %x) {
23 ; CHECK: # %bb.0: # %entry
24 ; CHECK-NEXT: vcvtph2ps %xmm0, %ymm1
25 ; CHECK-NEXT: vcmpgtps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm1, %k1
26 ; CHECK-NEXT: vpbroadcastw {{.*#+}} xmm1 = [-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf]
27 ; CHECK-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
28 ; CHECK-NEXT: vmovdqa32 %ymm2, %ymm2 {%k1} {z}
29 ; CHECK-NEXT: vpmovdw %ymm2, %xmm2
30 ; CHECK-NEXT: vpternlogq {{.*#+}} xmm0 = xmm1 ^ (xmm2 & (xmm0 ^ xmm1))
31 ; CHECK-NEXT: vzeroupper
34 %cmp2 = fcmp ogt <8 x half> %x, splat (half 0xHFC00)
35 %cond.v = select <8 x i1> %cmp2, <8 x half> %x, <8 x half> splat (half 0xHFC00)
36 ret <8 x half> %cond.v