xref: /llvm-project/llvm/test/CodeGen/X86/2011-20-21-zext-ui2fp.ll (revision 8b43c1be23119c1024bed0a8ce392bc73727e2e2)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 | FileCheck %s
3
4; Check that the booleans are converted using zext and not via sext.
5; 0x1 means that we only look at the first bit.
6
7define void @ui_to_fp_conv(ptr nocapture %aFOO, ptr nocapture %RET) nounwind {
8; CHECK-LABEL: ui_to_fp_conv:
9; CHECK:       # %bb.0: # %allocas
10; CHECK-NEXT:    movsd {{.*#+}} xmm0 = [1.0E+0,1.0E+0,0.0E+0,0.0E+0]
11; CHECK-NEXT:    xorps %xmm1, %xmm1
12; CHECK-NEXT:    movups %xmm1, 16(%rsi)
13; CHECK-NEXT:    movups %xmm0, (%rsi)
14; CHECK-NEXT:    retq
15allocas:
16  %bincmp = fcmp olt <8 x float> <float 1.000000e+00, float 1.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00> , <float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00>
17  %bool2float = uitofp <8 x i1> %bincmp to <8 x float>
18  store <8 x float> %bool2float, ptr %RET, align 4
19  ret void
20}
21
22
23
24