Clang Project

clang_source_code/test/CodeGen/misaligned-param.c
1// RUN: %clang_cc1 %s -triple i386-apple-darwin -emit-llvm -o - | FileCheck %s
2// Misaligned parameter must be memcpy'd to correctly aligned temporary.
3
4struct s { int x; long double y; };
5long double foo(struct s x, int i, struct s y) {
6// CHECK: foo
7// CHECK: %x = alloca %struct.s, align 16
8// CHECK: %y = alloca %struct.s, align 16
9// CHECK: memcpy
10// CHECK: memcpy
11// CHECK: bar
12  return bar(&x, &y);
13}
14