1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
2 ; RUN: opt -passes=loop-vectorize -S -force-vector-width=4 -enable-interleaved-mem-accesses=true -debug-only=loop-vectorize < %s 2>&1 | FileCheck %s
5 ; This test checks if an unused interleave group is removed by removeDeadRecipes.
7 %struct.foo = type { ptr, ptr }
9 define 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 * UF
13 ; CHECK-NEXT: Live-in vp<%1> = vector-trip-count
14 ; CHECK-NEXT: Live-in ir<%length> = original trip-count
16 ; CHECK-NEXT: vector.ph:
17 ; CHECK-NEXT: Successor(s): vector loop
19 ; CHECK-NEXT: <x1> vector loop: {
20 ; CHECK-NEXT: vector.body:
21 ; CHECK-NEXT: EMIT vp<%2> = CANONICAL-INDUCTION ir<0>, vp<%index.next>
22 ; CHECK-NEXT: EMIT vp<%index.next> = add nuw vp<%2>, vp<%0>
23 ; CHECK-NEXT: EMIT branch-on-count vp<%index.next>, vp<%1>
24 ; CHECK-NEXT: No successors
30 %iv = phi i32 [ %iv.next, %for.body ], [ 0, %entry ]
31 %next19.i.i = getelementptr inbounds %struct.foo, ptr %src, i32 %iv, i32 0
32 %load_p1 = load ptr, ptr %next19.i.i, align 4
33 %arrayidx15.i.i1427 = getelementptr inbounds %struct.foo, ptr %src, i32 %iv
34 %val.i.i = getelementptr inbounds %struct.foo, ptr %arrayidx15.i.i1427, i32 0, i32 1
35 %load_p2 = load ptr, ptr %val.i.i, align 4
36 %iv.next = add nuw nsw i32 %iv, 1
37 %cond = icmp eq i32 %iv.next, %length
38 br i1 %cond, label %for.end, label %for.body