xref: /llvm-project/llvm/test/Transforms/LoopVectorize/PowerPC/predcost.ll (revision 4d425f86632fc2a7142d2ba1c8d67a19c620d355)
1*4d425f86SRoland Froese; RUN: opt -ppc-vec-mask-cost=true -aa-pipeline=basic-aa -mcpu=pwr8 -S -passes=loop-vectorize < %s | FileCheck %s
2*4d425f86SRoland Froese
3*4d425f86SRoland Froesetarget datalayout = "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512"
4*4d425f86SRoland Froesetarget triple = "powerpc64le-unknown-linux-gnu"
5*4d425f86SRoland Froese
6*4d425f86SRoland Froesedefine dso_local void @_tc(ptr nocapture noundef %aaa, i64 noundef %bbb) local_unnamed_addr {
7*4d425f86SRoland Froese; CHECK-NOT: extractelement <16 x i1>
8*4d425f86SRoland Froeseentry:
9*4d425f86SRoland Froese  br label %for.body
10*4d425f86SRoland Froese
11*4d425f86SRoland Froesefor.cond.cleanup.loopexit:                        ; preds = %for.inc
12*4d425f86SRoland Froese  ret void
13*4d425f86SRoland Froese
14*4d425f86SRoland Froesefor.body:                                         ; preds = %for.inc, %entry
15*4d425f86SRoland Froese  %i.08 = phi i64 [ %inc, %for.inc ], [ 0, %entry ]
16*4d425f86SRoland Froese  %arrayidx = getelementptr inbounds i8, ptr %aaa, i64 %i.08
17*4d425f86SRoland Froese  %0 = load i8, ptr %arrayidx, align 1
18*4d425f86SRoland Froese  %cmp1 = icmp eq i8 %0, 0
19*4d425f86SRoland Froese  br i1 %cmp1, label %if.then, label %for.inc
20*4d425f86SRoland Froese
21*4d425f86SRoland Froeseif.then:                                          ; preds = %for.body
22*4d425f86SRoland Froese  store i8 32, ptr %arrayidx, align 1
23*4d425f86SRoland Froese  br label %for.inc
24*4d425f86SRoland Froese
25*4d425f86SRoland Froesefor.inc:                                          ; preds = %if.then, %for.body
26*4d425f86SRoland Froese  %inc = add nuw nsw i64 %i.08, 1
27*4d425f86SRoland Froese  %exitcond.not = icmp eq i64 %inc, %bbb
28*4d425f86SRoland Froese  br i1 %exitcond.not, label %for.cond.cleanup.loopexit, label %for.body
29*4d425f86SRoland Froese}
30