https://llvm.org/bugs/show_bug.cgi?id=27849
Bug ID: 27849 Summary: Incorrect call slot optimization in memcpyopt with noalias 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 Testcase: #include <cstdlib> bool b = true; __attribute((noinline)) void bar(int* x) { *x = 10; if (b) throw 0; } __attribute((noinline)) void foo(int& __restrict x) { int t; bar(&t); x = t; } int main() { int x = 1; try { foo(x); } catch (...) {} if (x != 1) abort(); } Works correctly with gcc and clang -O0; aborts with clang -O2. Call slot optimization is being too aggressive in memcpyopt. -- 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