[PATCH] D104051: [coro] Fix rematerializable instruction sinking to coro.suspend blocks

Arnold Schwaighofer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 23 11:22:08 PDT 2021


aschwaighofer added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:1932
+        CurrentBlock = IsInCoroSuspendBlock
+                           ? U->getParent()->getSingleSuccessor()
+                           : U->getParent();
----------------
nate_chandler wrote:
> This should this be `getSinglePredecessor()`, right?
Thanks, for catching that. Yes we need to rematerialized the value in the predecessor block to the the suspend if the suspend uses it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104051



More information about the llvm-commits mailing list