[PATCH] D101718: [X86] Fold load with tail call more aggressively

Nick Zavaritsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 2 02:31:16 PDT 2021


mejedi added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1209
         continue;
+      if (N->getOpcode() == X86ISD::TC_RETURN) {
+        // The TC_RETURN instructions execute after the epilog, so they
----------------
This part I'm least happy about. It was copied verbatim from X86InstrCompiler.td (X86tcret_6regs).

TBH, I don't fully understand the implications of moving LOAD close to TC_RETURN. It looks safe. However, if this check is omitted, we can end up moving the LOAD and not folding it. This is causing malformed DAG during scheduling in test/CodeGen/X86/musttail-varargs.ll, can't figure why.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101718



More information about the llvm-commits mailing list