Fixed some bugs.
[llvm/zpu.git] / test / FrontendC / misaligned-param.c
blobb4fcfe312f5af9e831d098f5b731b8d7ee11d253
1 // RUN: %llvmgcc %s -m32 -S -o - | FileCheck %s
2 // Misaligned parameter must be memcpy'd to correctly aligned temporary.
3 // XFAIL: *
4 // XTARGET: i386-apple-darwin,i686-apple-darwin,x86_64-apple-darwin
6 struct s { int x; long double y; };
7 long double foo(struct s x, int i, struct s y) {
8 // CHECK: foo
9 // CHECK: %x_addr = alloca %struct.s, align 16
10 // CHECK: %y_addr = alloca %struct.s, align 16
11 // CHECK: memcpy
12 // CHECK: memcpy
13 // CHECK: bar
14 return bar(&x, &y);