58 lines · plain
1; RUN: llc < %s | FileCheck %s2 3target triple = "msp430"4 5%struct.X = type { i8 }6 7; CHECK-LABEL: @foo8; CHECK: sub #4, r19; CHECK: mov.b #1, 3(r1)10define void @foo() {11 %1 = alloca %struct.X12 %2 = alloca %struct.X13 %3 = alloca %struct.X14 %4 = getelementptr inbounds %struct.X, ptr %1, i32 0, i32 015 store i8 1, ptr %416 %5 = getelementptr inbounds %struct.X, ptr %2, i32 0, i32 017 store i8 1, ptr %518 %6 = getelementptr inbounds %struct.X, ptr %3, i32 0, i32 019 store i8 1, ptr %620 ret void21}22 23; CHECK-LABEL: @bar24; CHECK: sub #4, r125; CHECK: mov.b #1, 3(r1)26define void @bar() {27 %1 = alloca [3 x %struct.X]28 %2 = getelementptr inbounds [3 x %struct.X], ptr %1, i16 0, i16 029 %3 = getelementptr inbounds %struct.X, ptr %2, i32 0, i32 030 store i8 1, ptr %331 %4 = getelementptr inbounds [3 x %struct.X], ptr %1, i16 0, i16 132 %5 = getelementptr inbounds %struct.X, ptr %4, i32 0, i32 033 store i8 1, ptr %534 %6 = getelementptr inbounds [3 x %struct.X], ptr %1, i16 0, i16 235 %7 = getelementptr inbounds %struct.X, ptr %6, i32 0, i32 036 store i8 1, ptr %737 ret void38}39 40%struct.Y = type { i8, i16 }41 42; CHECK-LABEL: @baz43; CHECK: sub #8, r144; CHECK: mov #2, 6(r1)45define void @baz() {46 %1 = alloca %struct.Y, align 247 %2 = alloca %struct.Y, align 248 %3 = getelementptr inbounds %struct.Y, ptr %1, i32 0, i32 049 store i8 1, ptr %3, align 250 %4 = getelementptr inbounds %struct.Y, ptr %1, i32 0, i32 151 store i16 2, ptr %4, align 252 %5 = getelementptr inbounds %struct.Y, ptr %2, i32 0, i32 053 store i8 1, ptr %5, align 254 %6 = getelementptr inbounds %struct.Y, ptr %2, i32 0, i32 155 store i16 2, ptr %6, align 256 ret void57}58