mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
3550840eb3
generated code was apparently doing stores directly into the return value aggregate; now, it's doing a copy from a compiler-generated static object. That object is initialized using [4 x i8] which breaks the test. I believe this change preserves the original point of the test. Of course it would be better for the code to do stores directly into the return aggregate, but that is not what happens at -O0; the llvm optimizers seem to do that on x86 but not on ppc32, possibly because of the explicit padding (which is unavoidable). I think it must have been being done by a gcc optimizer pass before. llvm-svn: 73972
13 lines
276 B
C
13 lines
276 B
C
// PR 1278
|
|
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep {struct.s} | not grep "4 x i8] zeroinitializer"
|
|
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | not grep "i32 0, i32 2"
|
|
struct s {
|
|
double d1;
|
|
int s1;
|
|
};
|
|
|
|
struct s foo(void) {
|
|
struct s S = {1.1, 2};
|
|
return S;
|
|
}
|