1 ; RUN: llc < %s -mtriple armv4t-unknown-linux-gnueabi -mattr=+strict-align
3 ; Avoid crash from forwarding indexed-loads back to store.
4 %struct.anon = type { %struct.ma*, %struct.mb }
5 %struct.ma = type { i8 }
6 %struct.mb = type { i8, i8 }
7 %struct.anon.0 = type { %struct.anon.1 }
8 %struct.anon.1 = type { %struct.ds }
9 %struct.ds = type <{ i8, %union.ie }>
10 %union.ie = type { %struct.ib }
11 %struct.ib = type { i8, i8, i16 }
13 @a = common dso_local local_unnamed_addr global %struct.anon* null, align 4
14 @b = common dso_local local_unnamed_addr global %struct.anon.0 zeroinitializer, align 1
16 ; Function Attrs: norecurse nounwind
17 define dso_local void @func() local_unnamed_addr {
19 %0 = load %struct.anon*, %struct.anon** @a, align 4
20 %ad = getelementptr inbounds %struct.anon, %struct.anon* %0, i32 0, i32 0
21 %1 = load %struct.ma*, %struct.ma** %ad, align 4
22 %c.sroa.0.0..sroa_idx = getelementptr inbounds %struct.ma, %struct.ma* %1, i32 0, i32 0
23 %c.sroa.0.0.copyload = load i8, i8* %c.sroa.0.0..sroa_idx, align 1
24 %cb = getelementptr inbounds %struct.anon, %struct.anon* %0, i32 0, i32 1
25 %band = getelementptr inbounds %struct.anon, %struct.anon* %0, i32 0, i32 1, i32 1
26 store i8 %c.sroa.0.0.copyload, i8* %band, align 4
27 store i8 6, i8* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @b, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0), align 1
28 store i8 2, i8* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @b, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1), align 1
29 %2 = bitcast %struct.mb* %cb to i32*
30 %3 = load i32, i32* bitcast (i8* getelementptr inbounds (%struct.anon.0, %struct.anon.0* @b, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0) to i32*), align 1
31 store i32 %3, i32* %2, align 1