https://llvm.org/bugs/show_bug.cgi?id=28189
Bug ID: 28189 Summary: DSE miscompile with TBAA Product: libraries Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: Scalar Optimizations Assignee: unassignedb...@nondot.org Reporter: eli.fried...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Artificial evil testcase: #include <stdio.h> #include <string.h> #include <stdlib.h> int f(int* x, int *y) { *x = 10; int z = *y; *(float*)x = 1.0; return z; } int (*ff)(int*,int*) = f; int main() { void* x = malloc(4); printf("%d\n", ff(x, x)); } Should print 10; with clang -O2, prints 0. Tested on x86-64 Linux with trunk clang. DSE is incorrectly ignoring the load when it eliminates the store. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs