1. Fix the widening of SETCC in WidenVecOp_SETCC. Use the correct return CC type.
[oota-llvm.git] / test / CodeGen / X86 / 2011-10-21-widen-cmp.ll
1 ; RUN: llc < %s -march=x86-64 -mcpu=corei7 | FileCheck %s
2
3 target triple = "x86_64-unknown-linux-gnu"
4
5 ; Check that a <4 x float> compare is generated and that we are
6 ; not stuck in an endless loop.
7
8 ; CHECK: cmp_2_floats
9 ; CHECK: cmpordps
10 ; CHECK: ret
11
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 }
19
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 }