[PATCH] D55897: Add constrained fptrunc and fpext intrinsics

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 09:47:42 PDT 2019


kpn marked 6 inline comments as done.
kpn added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1798
+  if (OldChain) {
+    DAG.ReplaceAllUsesOfValueWith(SDValue(Load.getNode(), 1), Chain);
+  }
----------------
craig.topper wrote:
> This line doesn't make sense to me. This is replacing the users of result 1 of the load you just created with Chain. But no one has seen this load yet so how can its result 1 have any users?
Agreed. I'm fixing it now.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2806
+                            Node->getValueType(0),
+                            Node->getValueType(0), dl, Node);
+    ReplaceNodeIgnoreChain(Node, Tmp1.getNode());
----------------
craig.topper wrote:
> Shouldn't you be passing the input chain operand of Node into the last argument? Right now it looks like you're using the Chain result from Node itself. But we want to delete Node.
I'm now changing EmitStackConvert to splice itself into the chain. So passing Node is about to become correct since I need both ends of the chain to do the splicing.


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

https://reviews.llvm.org/D55897





More information about the llvm-commits mailing list