1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mcpu=skylake-avx512 -mtriple=x86_64-unknown-unknown | FileCheck %s
4 @b = local_unnamed_addr global i32 0, align 4
5 @c = local_unnamed_addr global i32 0, align 4
6 @d = local_unnamed_addr global float 0.000000e+00, align 4
8 define float @_Z3fn2v() {
9 ; CHECK-LABEL: _Z3fn2v:
10 ; CHECK: # %bb.0: # %entry
11 ; CHECK-NEXT: pushq %rax
12 ; CHECK-NEXT: .cfi_def_cfa_offset 16
13 ; CHECK-NEXT: callq _Z1av
14 ; CHECK-NEXT: # kill: def $al killed $al def $eax
15 ; CHECK-NEXT: kmovd %eax, %k1
16 ; CHECK-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
17 ; CHECK-NEXT: vmovss %xmm0, %xmm0, %xmm0 {%k1} {z}
18 ; CHECK-NEXT: cmpl $0, {{.*}}(%rip)
19 ; CHECK-NEXT: je .LBB0_2
20 ; CHECK-NEXT: # %bb.1: # %if.then
21 ; CHECK-NEXT: vcvtsi2ssl {{.*}}(%rip), %xmm1, %xmm1
22 ; CHECK-NEXT: kmovd %eax, %k1
23 ; CHECK-NEXT: vxorps %xmm2, %xmm2, %xmm2
24 ; CHECK-NEXT: vmovss %xmm2, %xmm0, %xmm1 {%k1}
25 ; CHECK-NEXT: vmovss %xmm1, {{.*}}(%rip)
26 ; CHECK-NEXT: .LBB0_2: # %if.end
27 ; CHECK-NEXT: popq %rax
28 ; CHECK-NEXT: .cfi_def_cfa_offset 8
31 %call = tail call zeroext i1 @_Z1av()
32 %cond = select i1 %call, float 7.500000e-01, float 0.000000e+00
33 %0 = load i32, i32* @c, align 4
34 %tobool2 = icmp eq i32 %0, 0
35 br i1 %tobool2, label %if.end, label %if.then
37 if.then: ; preds = %entry
38 %1 = load i32, i32* @b, align 4
39 %2 = sitofp i32 %1 to float
40 %conv5 = select i1 %call, float 0.000000e+00, float %2
41 store float %conv5, float* @d, align 4
44 if.end: ; preds = %entry, %if.then
48 declare zeroext i1 @_Z1av()