2 ; RUN: opt < %s -force-vector-width=2 -force-vector-interleave=1 -loop-vectorize -S --debug-only=loop-vectorize 2>&1 | FileCheck %s
4 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
5 target triple = "aarch64--linux-gnu"
7 %pair = type { i8, i8 }
10 ; CHECK: Found an estimated cost of 17 for VF 2 For instruction: {{.*}} load i8
11 ; CHECK: Found an estimated cost of 0 for VF 2 For instruction: {{.*}} load i8
13 ; CHECK: load <4 x i8>
14 ; CHECK: br i1 {{.*}}, label %middle.block, label %vector.body
16 define void @test(%pair* %p, i64 %n) {
21 %i = phi i64 [ 0, %entry ], [ %i.next, %for.body ]
22 %tmp0 = getelementptr %pair, %pair* %p, i64 %i, i32 0
23 %tmp1 = load i8, i8* %tmp0, align 1
24 %tmp2 = getelementptr %pair, %pair* %p, i64 %i, i32 1
25 %tmp3 = load i8, i8* %tmp2, align 1
26 %i.next = add nuw nsw i64 %i, 1
27 %cond = icmp eq i64 %i.next, %n
28 br i1 %cond, label %for.end, label %for.body