1*2e14900dSBjorn Pettersson; RUN: opt < %s  -passes=loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -S | FileCheck %s
2cee313d2SEric Christopher
3cee313d2SEric Christophertarget datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
4cee313d2SEric Christopher
5cee313d2SEric Christopher; Make sure we output the abi alignment if no alignment is specified.
6cee313d2SEric Christopher
7cee313d2SEric Christopher;CHECK-LABEL: @align
8cee313d2SEric Christopher;CHECK: load <4 x i32>, <4 x i32>* {{.*}} align  4
9cee313d2SEric Christopher;CHECK: load <4 x i32>, <4 x i32>* {{.*}} align  4
10cee313d2SEric Christopher;CHECK: store <4 x i32> {{.*}} align  4
11cee313d2SEric Christopher
12cee313d2SEric Christopherdefine void @align(i32* %a, i32* %b, i32* %c) nounwind uwtable ssp {
13cee313d2SEric Christopher  br label %1
14cee313d2SEric Christopher
15cee313d2SEric Christopher; <label>:1                                       ; preds = %1, %0
16cee313d2SEric Christopher  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %1 ]
17cee313d2SEric Christopher  %2 = getelementptr inbounds i32, i32* %b, i64 %indvars.iv
18cee313d2SEric Christopher  %3 = load i32, i32* %2
19cee313d2SEric Christopher  %4 = getelementptr inbounds i32, i32* %c, i64 %indvars.iv
20cee313d2SEric Christopher  %5 = load i32, i32* %4
21cee313d2SEric Christopher  %6 = add nsw i32 %5, %3
22cee313d2SEric Christopher  %7 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv
23cee313d2SEric Christopher  store i32 %6, i32* %7
24cee313d2SEric Christopher  %indvars.iv.next = add i64 %indvars.iv, 1
25cee313d2SEric Christopher  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
26cee313d2SEric Christopher  %exitcond = icmp eq i32 %lftr.wideiv, 128
27cee313d2SEric Christopher  br i1 %exitcond, label %8, label %1
28cee313d2SEric Christopher
29cee313d2SEric Christopher; <label>:8                                       ; preds = %1
30cee313d2SEric Christopher  ret void
31cee313d2SEric Christopher}
32cee313d2SEric Christopher
33