[PATCH] D114795: [PR52475] Ensure a correct chain in copies to/from hidden sret parameter

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 30 18:27:32 PST 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1924
 
-    SDValue RetPtr = DAG.getCopyFromReg(DAG.getEntryNode(), getCurSDLoc(),
-                                        DemoteReg, PtrValueVTs[0]);
+    SDValue RetPtr = DAG.getCopyFromReg(DAG.getRoot(), getCurSDLoc(), DemoteReg,
+                                        PtrValueVTs[0]);
----------------
Is there any difference if we use the local Chain variable here. I think getControlRoot should ensure DAG.getRoot is in sync with the Chain returned.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114795



More information about the llvm-commits mailing list