1 ; RUN: llc < %s | FileCheck %s
3 target triple = "msp430"
5 %struct.X = type { i8 }
9 ; CHECK: mov.b #1, 3(r1)
14 %4 = getelementptr inbounds %struct.X, ptr %1, i32 0, i32 0
16 %5 = getelementptr inbounds %struct.X, ptr %2, i32 0, i32 0
18 %6 = getelementptr inbounds %struct.X, ptr %3, i32 0, i32 0
25 ; CHECK: mov.b #1, 3(r1)
27 %1 = alloca [3 x %struct.X]
28 %2 = getelementptr inbounds [3 x %struct.X], ptr %1, i16 0, i16 0
29 %3 = getelementptr inbounds %struct.X, ptr %2, i32 0, i32 0
31 %4 = getelementptr inbounds [3 x %struct.X], ptr %1, i16 0, i16 1
32 %5 = getelementptr inbounds %struct.X, ptr %4, i32 0, i32 0
34 %6 = getelementptr inbounds [3 x %struct.X], ptr %1, i16 0, i16 2
35 %7 = getelementptr inbounds %struct.X, ptr %6, i32 0, i32 0
40 %struct.Y = type { i8, i16 }
44 ; CHECK: mov #2, 6(r1)
46 %1 = alloca %struct.Y, align 2
47 %2 = alloca %struct.Y, align 2
48 %3 = getelementptr inbounds %struct.Y, ptr %1, i32 0, i32 0
49 store i8 1, ptr %3, align 2
50 %4 = getelementptr inbounds %struct.Y, ptr %1, i32 0, i32 1
51 store i16 2, ptr %4, align 2
52 %5 = getelementptr inbounds %struct.Y, ptr %2, i32 0, i32 0
53 store i8 1, ptr %5, align 2
54 %6 = getelementptr inbounds %struct.Y, ptr %2, i32 0, i32 1
55 store i16 2, ptr %6, align 2