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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 17:12:46 PDT 2019


efriedma 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:
> 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.


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