Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID
[oota-llvm.git] / test / CodeGen / X86 / v8i1-masks.ll
1 ; RUN: llc -march=x86-64 -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -o - < %s | FileCheck %s
2
3 ;CHECK: and_masks
4 ;CHECK: vmovups
5 ;CHECK-NEXT: vcmpltp
6 ;CHECK-NEXT: vandps
7 ;CHECK-NEXT: vmovups
8 ;CHECK: ret
9
10 define void @and_masks(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwind uwtable noinline ssp {
11   %v0 = load <8 x float>* %a, align 16
12   %v1 = load <8 x float>* %b, align 16
13   %m0 = fcmp olt <8 x float> %v1, %v0
14   %v2 = load <8 x float>* %c, align 16
15   %m1 = fcmp olt <8 x float> %v2, %v0
16   %mand = and <8 x i1> %m1, %m0
17   %r = zext <8 x i1> %mand to <8 x i32>
18   store <8 x i32> %r, <8 x i32>* undef, align 16
19   ret void
20 }
21
22 ;CHECK: neg_mask
23 ;CHECK:  vmovups
24 ;CHECK-NEXT: vcmpltps
25 ;CHECK-NEXT: vandps
26 ;CHECK-NEXT: vmovups
27 ;CHECK: ret
28
29 define void @neg_masks(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwind uwtable noinline ssp {
30   %v0 = load <8 x float>* %a, align 16
31   %v1 = load <8 x float>* %b, align 16
32   %m0 = fcmp olt <8 x float> %v1, %v0
33   %mand = xor <8 x i1> %m0, <i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1>
34   %r = zext <8 x i1> %mand to <8 x i32>
35   store <8 x i32> %r, <8 x i32>* undef, align 16
36   ret void
37 }
38