https://llvm.org/bugs/show_bug.cgi?id=28551
Sebastian Pop <seb...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #9 from Sebastian Pop <seb...@gmail.com> --- Which explains the crashes all over the place: the std::sort of today's libcxx is inefficient as it calls the compare function on the same element: // known that *(__i - 1) < *__m // known that __i <= __m while (true) { // __m still guards upward moving __i while (__comp(*__i, *__m)) ++__i; // It is now known that a guard exists for downward moving __j while (!__comp(*--__j, *__m)) ; if (__i > __j) break; swap(*__i, *__j); ++__n_swaps; // It is known that __m != __j // If __m just moved, follow it if (__m == __i) __m = __j; ++__i; } In particular this "if (__m == __i)" should be above the first call to __comp(). Maybe some other places. As the buildbots are not bootstrapping their libc++, there is not much I can do to avoid all the users of Apple toolchains to see the assert failing. I will remove the assert that I have in the GVNHoist code, and open a libcxx bug for inefficiencies in the std::sort() algorithm. -- 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