[llvm-commits] [llvm] r66366 - in /llvm/trunk: lib/Transforms/Scalar/ScalarReplAggregates.cpp test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll test/Transforms/ScalarRepl/vector_memcpy.ll
Eli Friedman
eli.friedman at gmail.com
Sun Mar 8 13:09:28 PDT 2009
On Sun, Mar 8, 2009 at 11:54 AM, Chris Lattner <clattner at apple.com> wrote:
> Do you have an example that would illustrate this problem?
Compile the following with "clang -S -O2 -mattr=-sse".
#include <string.h>
#include <stdio.h>
__attribute__((noinline)) void a(float* x, float* y) {
float z;
memcpy(&z, y, 4);
memcpy(x, &z, 4);
}
int main() {
unsigned x = 2139095041, y;
a((float*)&y,(float*)&x);
if (y != 2139095041) {
printf("y corrupted!\n");
return 1;
}
return 0;
}
-Eli
More information about the llvm-commits
mailing list