brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.1 KiB · 3c39a1d Raw
75 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --filter "Cost of"2; RUN: opt -S -passes=loop-vectorize -mcpu=skylake-avx512 -mtriple=x86_64-apple-macosx -debug -disable-output -S %s 2>&1 | FileCheck %s3 4; REQUIRES: asserts5 6target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"7 8define void @wide_or_replaced_with_add_vpinstruction(ptr %src, ptr noalias %dst) {9; CHECK-LABEL: 'wide_or_replaced_with_add_vpinstruction'10; CHECK:  Cost of 1 for VF 2: induction instruction %iv.next = add nuw nsw i64 %iv, 111; CHECK:  Cost of 0 for VF 2: induction instruction %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop.latch ]12; CHECK:  Cost of 1 for VF 2: exit condition instruction %exitcond = icmp eq i64 %iv.next, 3213; CHECK:  Cost of 0 for VF 2: EMIT vp<%3> = CANONICAL-INDUCTION ir<0>, vp<%index.next>14; CHECK:  Cost of 0 for VF 2: ir<%iv> = WIDEN-INDUCTION nuw nsw ir<0>, ir<1>, vp<%0>15; CHECK:  Cost of 0 for VF 2: vp<%4> = SCALAR-STEPS vp<%3>, ir<1>16; CHECK:  Cost of 0 for VF 2: CLONE ir<%g.src> = getelementptr inbounds ir<%src>, vp<%4>17; CHECK:  Cost of 0 for VF 2: vp<%5> = vector-pointer inbounds ir<%g.src>18; CHECK:  Cost of 1 for VF 2: WIDEN ir<%l> = load vp<%5>19; CHECK:  Cost of 1 for VF 2: WIDEN ir<%iv.4> = add ir<%iv>, ir<4>20; CHECK:  Cost of 1 for VF 2: WIDEN ir<%c> = icmp ule ir<%l>, ir<128>21; CHECK:  Cost of 1 for VF 2: EMIT ir<%or> = add ir<%iv.4>, ir<1>22; CHECK:  Cost of 0 for VF 2: CLONE ir<%g.dst> = getelementptr ir<%dst>, ir<%or>23; CHECK:  Cost of 0 for VF 2: vp<%6> = vector-pointer ir<%g.dst>24; CHECK:  Cost of 1 for VF 2: WIDEN store vp<%6>, ir<%iv.4>, ir<%c>25; CHECK:  Cost of 0 for VF 2: EMIT vp<%index.next> = add nuw vp<%3>, vp<%1>26; CHECK:  Cost of 0 for VF 2: EMIT branch-on-count vp<%index.next>, vp<%2>27; CHECK:  Cost of 0 for VF 2: vector loop backedge28; CHECK:  Cost of 1 for VF 4: induction instruction %iv.next = add nuw nsw i64 %iv, 129; CHECK:  Cost of 0 for VF 4: induction instruction %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop.latch ]30; CHECK:  Cost of 1 for VF 4: exit condition instruction %exitcond = icmp eq i64 %iv.next, 3231; CHECK:  Cost of 0 for VF 4: EMIT vp<%3> = CANONICAL-INDUCTION ir<0>, vp<%index.next>32; CHECK:  Cost of 0 for VF 4: ir<%iv> = WIDEN-INDUCTION nuw nsw ir<0>, ir<1>, vp<%0>33; CHECK:  Cost of 0 for VF 4: vp<%4> = SCALAR-STEPS vp<%3>, ir<1>34; CHECK:  Cost of 0 for VF 4: CLONE ir<%g.src> = getelementptr inbounds ir<%src>, vp<%4>35; CHECK:  Cost of 0 for VF 4: vp<%5> = vector-pointer inbounds ir<%g.src>36; CHECK:  Cost of 1 for VF 4: WIDEN ir<%l> = load vp<%5>37; CHECK:  Cost of 1 for VF 4: WIDEN ir<%iv.4> = add ir<%iv>, ir<4>38; CHECK:  Cost of 1 for VF 4: WIDEN ir<%c> = icmp ule ir<%l>, ir<128>39; CHECK:  Cost of 1 for VF 4: EMIT ir<%or> = add ir<%iv.4>, ir<1>40; CHECK:  Cost of 0 for VF 4: CLONE ir<%g.dst> = getelementptr ir<%dst>, ir<%or>41; CHECK:  Cost of 0 for VF 4: vp<%6> = vector-pointer ir<%g.dst>42; CHECK:  Cost of 1 for VF 4: WIDEN store vp<%6>, ir<%iv.4>, ir<%c>43; CHECK:  Cost of 0 for VF 4: EMIT vp<%index.next> = add nuw vp<%3>, vp<%1>44; CHECK:  Cost of 0 for VF 4: EMIT branch-on-count vp<%index.next>, vp<%2>45; CHECK:  Cost of 0 for VF 4: vector loop backedge46; CHECK:  Cost of 1 for VF 4: induction instruction %iv.next = add nuw nsw i64 %iv, 147; CHECK:  Cost of 0 for VF 4: induction instruction %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop.latch ]48; CHECK:  Cost of 1 for VF 4: exit condition instruction %exitcond = icmp eq i64 %iv.next, 3249;50entry:51  br label %loop.header52 53loop.header:54  %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop.latch ]55  %g.src = getelementptr inbounds i64, ptr %src, i64 %iv56  %l = load i64, ptr %g.src57  %iv.4 = add nuw nsw i64 %iv, 458  %c = icmp ule i64 %l, 12859  br i1 %c, label %loop.then, label %loop.latch60 61loop.then:62  %or = or disjoint i64 %iv.4, 163  %g.dst = getelementptr inbounds i64, ptr %dst, i64 %or64  store i64 %iv.4, ptr %g.dst, align 465  br label %loop.latch66 67loop.latch:68  %iv.next = add nuw nsw i64 %iv, 169  %exitcond = icmp eq i64 %iv.next, 3270  br i1 %exitcond, label %exit, label %loop.header71 72exit:73  ret void74}75