Home | History | Annotate | Download | only in X86
      1 ; RUN: llc -march=x86-64 -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -o - < %s | FileCheck %s
      2 
      3 ;CHECK-LABEL: and_masks:
      4 ;CHECK: vmovaps
      5 ;CHECK: vcmpltp
      6 ;CHECK: vcmpltp
      7 ;CHECK: vandps
      8 ;CHECK: vandps
      9 ;CHECK: vmovaps
     10 ;CHECK: ret
     11 
     12 define void @and_masks(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwind uwtable noinline ssp {
     13   %v0 = load <8 x float>, <8 x float>* %a, align 16
     14   %v1 = load <8 x float>, <8 x float>* %b, align 16
     15   %m0 = fcmp olt <8 x float> %v1, %v0
     16   %v2 = load <8 x float>, <8 x float>* %c, align 16
     17   %m1 = fcmp olt <8 x float> %v2, %v0
     18   %mand = and <8 x i1> %m1, %m0
     19   %r = zext <8 x i1> %mand to <8 x i32>
     20   store <8 x i32> %r, <8 x i32>* undef, align 32
     21   ret void
     22 }
     23 
     24 ;CHECK: neg_mask
     25 ;CHECK: vcmpltps
     26 ;CHECK: vxorps
     27 ;CHECK: vandps
     28 ;CHECK: vmovaps
     29 ;CHECK: ret
     30 define void @neg_masks(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwind uwtable noinline ssp {
     31   %v0 = load <8 x float>, <8 x float>* %a, align 16
     32   %v1 = load <8 x float>, <8 x float>* %b, align 16
     33   %m0 = fcmp olt <8 x float> %v1, %v0
     34   %mand = xor <8 x i1> %m0, <i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1>
     35   %r = zext <8 x i1> %mand to <8 x i32>
     36   store <8 x i32> %r, <8 x i32>* undef, align 32
     37   ret void
     38 }
     39 
     40