[PATCH] D59981: [SelectionDAGBuilder] Flush PendingExports before creating INLINEASM_BR node for asm goto.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 17:30:21 PDT 2019


craig.topper marked an inline comment as done.
craig.topper added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:8292
   // Only Update Root if inline assembly has a memory effect.
-  if (ResultValues.empty() || HasSideEffect || !OutChains.empty())
+  if (ResultValues.empty() || HasSideEffect || !OutChains.empty() || IsCallBr)
     DAG.setRoot(Chain);
----------------
efriedma wrote:
> efriedma wrote:
> > Does this have any practical effect?  Nothing can actually use the root after this point, I think.  Not a big deal either way, though.
> Err, actually, I guess visitCallBr uses the root?  In that case, I'm surprised you haven't seen any issues where the inline asm is getting thrown away by instruction selection.
I think ResultValues.empty() will be true for callbr given the current restrictions on no outputs, but I just wanted to explicitly mention CallBr out of paranoia.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59981





More information about the llvm-commits mailing list