[PATCH] D24244: SHL instruction crash in CodeGen - Fixed

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 04:04:48 PDT 2016


RKSimon added a comment.

Any chance that the test case can be simplified (i.e. de-bugpointified) a little?


================
Comment at: ../lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1073
@@ -1072,3 +1072,3 @@
       // to the appropriate width.
       if (!Node->getOperand(1).getValueType().isVector()) {
         SDValue SAO =
----------------
If it worth calling Node->getOperand(0) and Node->getOperand(1) only once?

================
Comment at: ../lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1080
@@ +1079,3 @@
+        // to update the parent node.
+        if (SAO != Node->getOperand(1))
+          NewNode = DAG.UpdateNodeOperands(Node, Node->getOperand(0), SAO);
----------------
So are you saying that if SAO == Node->getOperand(1) then its guaranteed to be already legal? Do we need to assert this?


Repository:
  rL LLVM

https://reviews.llvm.org/D24244





More information about the llvm-commits mailing list