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 = dso_local local_unnamed_addr global i32 0, align 4
5 @c = dso_local local_unnamed_addr global i32 0, align 4
6 @d = dso_local local_unnamed_addr global float 0.000000e+00, align 4
8 define dso_local 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@PLT
14 ; CHECK-NEXT: # kill: def $al killed $al def $eax
15 ; CHECK-NEXT: kmovd %eax, %k1
16 ; CHECK-NEXT: vmovss {{.*#+}} xmm0 {%k1} {z} = [7.5E-1,0.0E+0,0.0E+0,0.0E+0]
17 ; CHECK-NEXT: cmpl $0, c(%rip)
18 ; CHECK-NEXT: je .LBB0_2
19 ; CHECK-NEXT: # %bb.1: # %if.then
20 ; CHECK-NEXT: vcvtsi2ssl b(%rip), %xmm1, %xmm1
21 ; CHECK-NEXT: kmovd %eax, %k1
22 ; CHECK-NEXT: vxorps %xmm2, %xmm2, %xmm2
23 ; CHECK-NEXT: vmovss %xmm2, %xmm1, %xmm1 {%k1}
24 ; CHECK-NEXT: vmovss %xmm1, d(%rip)
25 ; CHECK-NEXT: .LBB0_2: # %if.end
26 ; CHECK-NEXT: popq %rax
27 ; CHECK-NEXT: .cfi_def_cfa_offset 8
30 %call = tail call zeroext i1 @_Z1av()
31 %cond = select i1 %call, float 7.500000e-01, float 0.000000e+00
32 %0 = load i32, ptr @c, align 4
33 %tobool2 = icmp eq i32 %0, 0
34 br i1 %tobool2, label %if.end, label %if.then
36 if.then: ; preds = %entry
37 %1 = load i32, ptr @b, align 4
38 %2 = sitofp i32 %1 to float
39 %conv5 = select i1 %call, float 0.000000e+00, float %2
40 store float %conv5, ptr @d, align 4
43 if.end: ; preds = %entry, %if.then
47 declare zeroext i1 @_Z1av()