[PATCH] D89768: [Coroutine] Properly determine whether an alloca should live on the frame

Xun Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 11:43:41 PST 2020


lxfind added a comment.

In D89768#2377441 <https://reviews.llvm.org/D89768#2377441>, @ben-clayton wrote:

> Hello,
>
> A git bisect has identified this change as the likely candidate for a new set of asserts / crashes in SwiftShader <https://opensource.google/projects/swiftshader> when attempting to use the coroutine passes. This is having knock-on issues with internal Google projects.
>
> When passing this IR <https://gist.github.com/ben-clayton/f86c02e7dc84357695b5e4d5ba65211b> to `./bin/opt crash.ir -coro-early -coro-split -coro-elide -S` with this change, we now get this crash <https://gist.github.com/ben-clayton/e2b383da11e71deec415b448dcea5ac9>.
> Running the same command on the parent change does not crash, and behaves as expected.
>
> I'd like to file a bug, but LLVM's Bugzilla is not letting me sign in, possibly due to spam restrictions. :-/
>
> I'll do some investigation myself tomorrow, but any assistance here would be gratefully appreciated.
>
> Many thanks,
> Ben

I can confirm that this patch introduced a bug.
It can be triggered when there is an alloca instruction defined after coro.begin and used after a suspension.  These allocas are not properly moved to the .resume function.
I will think about how to fix this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89768/new/

https://reviews.llvm.org/D89768



More information about the llvm-commits mailing list