https://llvm.org/bugs/show_bug.cgi?id=27857
Bug ID: 27857 Summary: licm miscompile with noalias and call which exits program Product: libraries Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: Loop Optimizer Assignee: unassignedb...@nondot.org Reporter: eli.fried...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Testcase: #include <stdlib.h> void f() { exit(0); } void (*ff)() = f; void g(int* restrict a) { for (int i = 0; i < 1000; ++i) { ff(); *a += 1; } } void (*gg)(int* restrict) = g; int main() { gg(0); } Works with gcc and clang -O0; crashes with clang -O2. I think LICM is relying too much on "MayThrow" to conclude that function calls will return normally. Testcase is artificial. -- 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