]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/blob - test/CodeGen/X86/2011-10-21-widen-cmp.ll
[X86][AVX] Simplified diff between AVX1 and SSE42 fp stack folding tests. NFC.
[opencl/llvm.git] / test / CodeGen / X86 / 2011-10-21-widen-cmp.ll
1 ; RUN: llc < %s -march=x86-64 -mcpu=corei7 | FileCheck %s
3 target triple = "x86_64-unknown-linux-gnu"
5 ; Check that a <4 x float> compare is generated and that we are
6 ; not stuck in an endless loop.
8 ; CHECK: cmp_2_floats
9 ; CHECK: cmpordps
10 ; CHECK: ret
12 define void @cmp_2_floats() {
13 entry:
14   %0 = fcmp oeq <2 x float> undef, undef
15   %1 = select <2 x i1> %0, <2 x float> undef, <2 x float> undef
16   store <2 x float> %1, <2 x float>* undef
17   ret void
18 }
20 ; CHECK: cmp_2_doubles
21 ; CHECK: cmpordpd
22 ; CHECK: blendvpd
23 ; CHECK: ret
24 define void @cmp_2_doubles() {
25 entry:
26   %0 = fcmp oeq <2 x double> undef, undef
27   %1 = select <2 x i1> %0, <2 x double> undef, <2 x double> undef
28   store <2 x double> %1, <2 x double>* undef
29   ret void
30 }
32 ; CHECK: mp_11193
33 ; CHECK: psraw   $15
34 ; CHECK: ret
35 define void @mp_11193(<8 x float> * nocapture %aFOO, <8 x float>* nocapture %RET)
36 nounwind {
37 allocas:
38   %bincmp = fcmp olt <8 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 9.000000e+00, float 1.000000e+00, float 9.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>
39   %t = extractelement <8 x i1> %bincmp, i32 0
40   %ft = sitofp i1 %t to float
41   %pp = bitcast <8 x float>* %RET to float*
42   store float %ft, float* %pp
43   ret void
44 }