1 ; RUN: opt -march=hexagon -O2 -S < %s
4 ; -fvectorize-loops infinite compile/memory
5 ; test checks that the compile completes successfully
7 target triple = "hexagon"
9 @g0 = global i8 -1, align 1
10 @g1 = common global [15 x i8] zeroinitializer, align 8
11 @g2 = common global [15 x i8*] zeroinitializer, align 8
13 ; Function Attrs: nounwind
14 define void @f0() #0 {
16 %v0 = alloca i32, align 4
17 store i32 0, i32* %v0, align 4
18 store i32 0, i32* %v0, align 4
21 b1: ; preds = %b3, %b0
22 %v1 = load i32, i32* %v0, align 4
23 %v2 = icmp slt i32 %v1, 15
24 br i1 %v2, label %b2, label %b4
27 %v3 = load i32, i32* %v0, align 4
28 %v4 = getelementptr inbounds [15 x i8], [15 x i8]* @g1, i32 0, i32 %v3
29 store i8 0, i8* %v4, align 1
30 %v5 = load i32, i32* %v0, align 4
31 %v6 = getelementptr inbounds [15 x i8*], [15 x i8*]* @g2, i32 0, i32 %v5
32 store i8* @g0, i8** %v6, align 4
36 %v7 = load i32, i32* %v0, align 4
37 %v8 = add nsw i32 %v7, 1
38 store i32 %v8, i32* %v0, align 4
45 attributes #0 = { nounwind }