1; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl | FileCheck %s 2 3; ModuleID = 'foo.ll' 4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 5target triple = "x86_64-unknown-linux-gnu" 6 7; Function Attrs: nounwind readnone 8declare i32 @llvm.x86.avx.movmsk.ps.256(<8 x float>) #0 9 10; Function Attrs: nounwind readnone 11declare i64 @llvm.cttz.i64(i64, i1) #0 12 13; Function Attrs: nounwind 14define void @foo(float* noalias %aFOO, float %b, i32 %a) { 15allocas: 16 %full_mask_memory.i57 = alloca <8 x float> 17 %return_value_memory.i60 = alloca i1 18 %cmp.i = icmp eq i32 %a, 65535 19 br i1 %cmp.i, label %all_on, label %some_on 20 21all_on: 22 %mask0 = load <8 x float>, <8 x float>* %full_mask_memory.i57 23 %v0.i.i.i70 = call i32 @llvm.x86.avx.movmsk.ps.256(<8 x float> %mask0) #0 24 %allon.i.i76 = icmp eq i32 %v0.i.i.i70, 65535 25 br i1 %allon.i.i76, label %check_neighbors.i.i121, label %domixed.i.i100 26 27domixed.i.i100: 28 br label %check_neighbors.i.i121 29 30check_neighbors.i.i121: 31 %v1.i5.i.i116 = call i32 @llvm.x86.avx.movmsk.ps.256(<8 x float> %mask0) #0 32 %alleq.i.i120 = icmp eq i32 %v1.i5.i.i116, 65535 33 br i1 %alleq.i.i120, label %all_equal.i.i123, label %not_all_equal.i.i124 34 35; CHECK: kxnorw %k0, %k0, %k0 36; CHECK: kshiftrw $15, %k0, %k0 37; CHECK: jmp 38; CHECK: kxorw %k0, %k0, %k0 39 40all_equal.i.i123: 41 br label %reduce_equal___vyi.exit128 42 43not_all_equal.i.i124: 44 br label %reduce_equal___vyi.exit128 45 46reduce_equal___vyi.exit128: 47 %calltmp2.i125 = phi i1 [ true, %all_equal.i.i123 ], [ false, %not_all_equal.i.i124 ] 48 store i1 %calltmp2.i125, i1* %return_value_memory.i60 49 %return_value.i126 = load i1, i1* %return_value_memory.i60 50 %. = select i1 %return_value.i126, i32 1, i32 0 51 %select_to_float = sitofp i32 %. to float 52 ret void 53 54some_on: 55 ret void 56} 57 58