summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-08-02 00:24:54 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-08-02 00:24:54 +0000
commitee1a1fc90043cc520e778ccde5241f451b9cc40c (patch)
tree5e01805e1546c748d4598aa9b20ca852c54f8a14 /llvm/lib/Target/Sparc
parent3707dda9041a4cb418537413cde94bfab68697d5 (diff)
downloadbcm5719-llvm-ee1a1fc90043cc520e778ccde5241f451b9cc40c.tar.gz
bcm5719-llvm-ee1a1fc90043cc520e778ccde5241f451b9cc40c.zip
[SDAG] Allow the legalizer to delete an illegally typed intermediate
introduced during legalization. This pattern is based on other patterns in the legalizer that I changed in the same way. Now, the legalizer eagerly collects its garbage when necessary so that we can survive leaving such nodes around for it. Instead, we add an assert to make sure the node will be correctly handled by that layer. llvm-svn: 214602
Diffstat (limited to 'llvm/lib/Target/Sparc')
-rw-r--r--llvm/lib/Target/Sparc/SparcISelLowering.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/Sparc/SparcISelLowering.cpp b/llvm/lib/Target/Sparc/SparcISelLowering.cpp
index 4d9f957bc3b..55eb1ea2aaa 100644
--- a/llvm/lib/Target/Sparc/SparcISelLowering.cpp
+++ b/llvm/lib/Target/Sparc/SparcISelLowering.cpp
@@ -2754,9 +2754,10 @@ static SDValue LowerUMULO_SMULO(SDValue Op, SelectionDAG &DAG,
ISD::SETNE);
}
// MulResult is a node with an illegal type. Because such things are not
- // generally permitted during this phase of legalization, delete the
- // node. The above EXTRACT_ELEMENT nodes should have been folded.
- DAG.DeleteNode(MulResult.getNode());
+ // generally permitted during this phase of legalization, ensure that
+ // nothing is left using the node. The above EXTRACT_ELEMENT nodes should have
+ // been folded.
+ assert(MulResult->use_empty() && "Illegally typed node still in use!");
SDValue Ops[2] = { BottomHalf, TopHalf } ;
return DAG.getMergeValues(Ops, dl);
OpenPOWER on IntegriCloud