[DAGCombiner] Vector constant folding for comparisons
[oota-llvm.git] / test / CodeGen / X86 / 2011-20-21-zext-ui2fp.ll
1 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 | FileCheck %s
2
3 ; Check that the booleans are converted using zext and not via sext.
4 ; 0x1 means that we only look at the first bit.
5
6 define void @ui_to_fp_conv(<8 x float> * nocapture %aFOO, <8 x float>* nocapture %RET) nounwind {
7 ; CHECK-LABEL: ui_to_fp_conv:
8 ; CHECK:       # BB#0: # %allocas
9 ; CHECK-NEXT:    movaps {{.*#+}} xmm0 = [1.000000e+00,1.000000e+00,0.000000e+00,0.000000e+00]
10 ; CHECK-NEXT:    xorps %xmm1, %xmm1
11 ; CHECK-NEXT:    movups %xmm1, 16(%rsi)
12 ; CHECK-NEXT:    movups %xmm0, (%rsi)
13 ; CHECK-NEXT:    retq
14 allocas:
15   %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>
16   %bool2float = uitofp <8 x i1> %bincmp to <8 x float>
17   store <8 x float> %bool2float, <8 x float>* %RET, align 4
18   ret void
19 }
20
21
22