summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2018-10-10 10:44:15 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2018-10-10 10:44:15 +0000
commit5cb3a82892ed66655849b49cd693c69f2139ec5c (patch)
tree50ffbc342b1166f2911b88524a9db4c4df403352 /llvm/lib/CodeGen/SelectionDAG
parentd227754973a4d4fd8b62798290c79a8be0ea4086 (diff)
downloadbcm5719-llvm-5cb3a82892ed66655849b49cd693c69f2139ec5c.tar.gz
bcm5719-llvm-5cb3a82892ed66655849b49cd693c69f2139ec5c.zip
[TargetLowering] Add root node back to work list after successful SimplifyDemandedBits/SimplifyDemandedVectorElts
Similar to what already happens in the DAGCombiner wrappers, this patch adds the root nodes back onto the worklist if the DCI wrappers' SimplifyDemandedBits/SimplifyDemandedVectorElts were successful. Differential Revision: https://reviews.llvm.org/D53026 llvm-svn: 344132
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 2858f4cdfae..04be0d4cf54 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -490,8 +490,10 @@ bool TargetLowering::SimplifyDemandedBits(SDValue Op, const APInt &DemandedMask,
KnownBits Known;
bool Simplified = SimplifyDemandedBits(Op, DemandedMask, Known, TLO);
- if (Simplified)
+ if (Simplified) {
+ DCI.AddToWorklist(Op.getNode());
DCI.CommitTargetLoweringOpt(TLO);
+ }
return Simplified;
}
@@ -1359,8 +1361,10 @@ bool TargetLowering::SimplifyDemandedVectorElts(SDValue Op,
bool Simplified =
SimplifyDemandedVectorElts(Op, DemandedElts, KnownUndef, KnownZero, TLO);
- if (Simplified)
+ if (Simplified) {
+ DCI.AddToWorklist(Op.getNode());
DCI.CommitTargetLoweringOpt(TLO);
+ }
return Simplified;
}
OpenPOWER on IntegriCloud