Open Quuxplusone opened 7 years ago
Attached test.cpp
(3949 bytes, text/plain): repro
Eric, can you confirm that it reproes on trunk?
I just pulled and rebuilt. It still repros on trunk, I'm afraid. :-(
Attached file_35270.txt
(48199 bytes, text/plain): another_repro_no_inline.ll
Is this for sure a Clang bug as opposed to an LLVM bug?
I've put some work into investigating this and https://bugs.llvm.org/show_bug.cgi?id=35048. I believe the two are exposing a related issue in LLVM, which I think is centered in the interaction between the inlining and coroutine splitting passes. I'm not yet certain.
I've found several LLVM IR files that trigger the assertion reported here. For example, this IR, https://gist.github.com/modocache/fe49375b039c888d2869c642907213d0, when run with 'opt -inline -coro-early -coro-split -coro-elide', hits the assertion reported here. Using bugpoint I reduced this to https://gist.github.com/modocache/1a3b9fc5b327a7a67e4443e180bad3d4, which still triggers the assert (but I'm not sure if it's still valid coroutines IR).
Considering the assertion is hit using just IR, I think this is a bug in LLVM, not Clang.
test.cpp
(3949 bytes, text/plain)file_35270.txt
(48199 bytes, text/plain)