1 ; RUN: llc -march=hexagon -mcpu=hexagonv65 < %s | FileCheck %s
5 ; struct S { char b; long long a; };
6 ; void foo(int x, struct S arg1);
14 ; Test that while passing a 7-byte struct on the stack, the
15 ; size of the struct is 16 bytes including padding since its
16 ; largest member is of type long long. This was being handled
17 ; correctly but is a sanity check against any potential future
21 ; CHECK: memd(r{{[0-9]+}}+#8) =
22 ; CHECK: memd(r{{[0-9]+}}+#0) =
24 %struct.S = type { i8, i64 }
26 ; Function Attrs: nounwind
27 define dso_local void @bar() local_unnamed_addr #0 {
29 %s = alloca %struct.S, align 8
30 %0 = getelementptr inbounds %struct.S, %struct.S* %s, i32 0, i32 0
31 call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %0) #3
32 store i8 97, i8* %0, align 8
33 tail call void @foo(i32 42, %struct.S* nonnull byval(%struct.S) align 8 %s) #3
34 call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %0) #3
38 ; Function Attrs: argmemonly nounwind willreturn
39 declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #1
41 declare dso_local void @foo(i32, %struct.S* byval(%struct.S) align 8) local_unnamed_addr #2
43 ; Function Attrs: argmemonly nounwind willreturn
44 declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #1