1 // RUN: %clang_cc1 -triple sparc-unknown-unknown -emit-llvm -o - %s | FileCheck %s
3 // Ensure that we pass proper alignment to llvm in the call
4 // instruction. The proper alignment for the type is sometimes known
5 // only by clang, and is not manifest in the LLVM-type. So, it must be
6 // explicitly passed through. (Besides the case of the user specifying
7 // alignment, as here, this situation also occurrs for non-POD C++
8 // structs with tail-padding: clang emits these as packed llvm-structs
13 } __attribute__((aligned(8)));
18 // Ensure the align 8 is passed through:
19 // CHECK-LABEL: define{{.*}} void @f1()
20 // CHECK: call void @f1_helper(ptr noundef byval(%struct.s1) align 8 @x1)
21 // Also ensure the declaration of f1_helper includes it
22 // CHECK: declare void @f1_helper(ptr noundef byval(%struct.s1) align 8)
24 void f1_helper(struct s1
);