1 ; RUN: llc -march=hexagon -O3 < %s | FileCheck %s
3 ; CHECK-NOT: [[REG0:(r[0-9]+)]] = memw([[REG0:(r[0-9]+)]]<<#2+##state-4)
5 %s.0 = type { i16, [10 x %s.1*] }
6 %s.1 = type { %s.2, i16, i16 }
7 %s.2 = type { i8, [15 x %s.3], [18 x %s.4], %s.5, i16 }
8 %s.3 = type { %s.5, %s.4*, i8*, i16, i8, i8, [3 x %s.4*], [3 x %s.4*], [3 x %s.4*] }
9 %s.4 = type { %s.5, %s.5*, i8, i16, i8 }
10 %s.5 = type { %s.5*, %s.5* }
11 %s.6 = type { i8, i8 }
13 @g0 = common global %s.0 zeroinitializer, align 4
15 ; Function Attrs: nounwind optsize
16 define void @f0(%s.6* nocapture readonly %a0) local_unnamed_addr #0 {
18 %v0 = bitcast %s.6* %a0 to %s.6*
19 %v1 = getelementptr %s.6, %s.6* %v0, i32 0, i32 1
20 %v2 = load i8, i8* %v1, align 1
21 %v3 = zext i8 %v2 to i32
22 %v4 = add nsw i32 %v3, -1
23 %v5 = getelementptr %s.0, %s.0* @g0, i32 0, i32 1
24 %v6 = getelementptr [10 x %s.1*], [10 x %s.1*]* %v5, i32 0, i32 %v4
25 %v7 = load %s.1*, %s.1** %v6, align 4
26 %v8 = icmp eq %s.1* %v7, null
27 br i1 %v8, label %b4, label %b1
30 %v9 = bitcast %s.1* %v7 to %s.1*
31 %v10 = bitcast %s.1* %v9 to i8*
32 %v11 = load i8, i8* %v10, align 4
33 %v12 = icmp eq i8 %v11, %v2
34 br i1 %v12, label %b2, label %b4
37 %v13 = bitcast %s.6* %a0 to %s.6*
38 tail call void @f1(%s.1* nonnull %v7) #2
39 %v14 = getelementptr %s.6, %s.6* %v13, i32 0, i32 1
40 %v15 = load i8, i8* %v14, align 1
41 %v16 = zext i8 %v15 to i32
42 %v17 = add nsw i32 %v16, -1
43 %v18 = getelementptr [10 x %s.1*], [10 x %s.1*]* %v5, i32 0, i32 %v17
44 %v19 = load %s.1*, %s.1** %v18, align 4
45 %v20 = icmp eq %s.1* %v19, null
46 br i1 %v20, label %b4, label %b3
49 %v21 = getelementptr %s.1, %s.1* %v19, i32 0, i32 0, i32 3
50 tail call void @f2(%s.5* %v21) #2
51 store %s.1* null, %s.1** %v18, align 4
54 b4: ; preds = %b3, %b2, %b1, %b0
58 ; Function Attrs: optsize
59 declare void @f1(%s.1*) #1
61 ; Function Attrs: optsize
62 declare void @f2(%s.5*) #1
64 attributes #0 = { nounwind optsize "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length64b" }
65 attributes #1 = { optsize "target-cpu"="hexagonv60" "target-features"="+hvx" }
66 attributes #2 = { nounwind }