https://llvm.org/bugs/show_bug.cgi?id=25895
Bug ID: 25895 Summary: clang generates infinite loop at -O2 Product: libraries Version: 3.7 Hardware: Macintosh OS: MacOS X Status: NEW Severity: normal Priority: P Component: Loop Optimizer Assignee: unassignedb...@nondot.org Reporter: daiwe...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Compiling this code on OSX using clang-3.7.0 with: clang++ -c -O2 -std=c++11 -stdlib=libc++ -arch arm64 miscompile.cpp results in code: $ otool -tV miscompile.o | c++filt | grep -E "^0+([0-9a-f]+)\s+cbz.*\1$" 0000000000003700 cbz x12, 0x3700 inside of the function Object::copyArrayData. It appears that the inlined protoHasArray method is causing this code to be generated. This also happens when generating x86 code: 00000000000032b0 testq %rdi, %rdi 00000000000032b3 je 0x32b0 This doesn't happen with clang 3.6.2 or with a lower optimization level. P.S.: Apologies for the giant input file. I couldn't find a way to reproduce with a trivial example. -- 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