brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · ef782b3 Raw
46 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 32; RUN: opt -passes=loop-vectorize -S -force-vector-width=4 -enable-interleaved-mem-accesses=true -debug-only=loop-vectorize --disable-output < %s 2>&1 | FileCheck %s3; REQUIRES: asserts4 5; This test checks if an unused interleave group is removed by removeDeadRecipes.6 7%struct.foo = type { ptr, ptr }8 9define void @test_unused_interleave(ptr %src, i32 %length) {10; CHECK-LABEL: Checking a loop in 'test_unused_interleave'11; CHECK: VPlan 'Initial VPlan for VF={4},UF>=1' {12; CHECK-NEXT: Live-in vp<%0> = VF * UF13; CHECK-NEXT: Live-in vp<%1> = vector-trip-count14; CHECK-NEXT: Live-in ir<%length> = original trip-count15; CHECK-EMPTY:16; CHECK-NEXT: ir-bb<entry>:17; CHECK-NEXT: Successor(s): scalar.ph, vector.ph18; CHECK-EMPTY:19; CHECK-NEXT: vector.ph:20; CHECK-NEXT: Successor(s): vector loop21; CHECK-EMPTY:22; CHECK-NEXT: <x1> vector loop: {23; CHECK-NEXT:   vector.body:24; CHECK-NEXT:     EMIT vp<%2> = CANONICAL-INDUCTION ir<0>, vp<%index.next>25; CHECK-NEXT:     EMIT vp<%index.next> = add nuw vp<%2>, vp<%0>26; CHECK-NEXT:     EMIT branch-on-count vp<%index.next>, vp<%1>27; CHECK-NEXT:   No successors28; CHECK-NEXT: }29entry:30  br label %for.body31 32for.body:33  %iv = phi i32 [ %iv.next, %for.body ], [ 0, %entry ]34  %next19.i.i = getelementptr inbounds %struct.foo, ptr %src, i32 %iv, i32 035  %load_p1 = load ptr, ptr %next19.i.i, align 436  %arrayidx15.i.i1427 = getelementptr inbounds %struct.foo, ptr %src, i32 %iv37  %val.i.i = getelementptr inbounds %struct.foo, ptr %arrayidx15.i.i1427, i32 0, i32 138  %load_p2 = load ptr, ptr %val.i.i, align 439  %iv.next = add nuw nsw i32 %iv, 140  %cond = icmp eq i32 %iv.next, %length41  br i1 %cond, label %for.end, label %for.body42 43for.end:44  ret void45}46