diff options
author | Craig Topper <craig.topper@intel.com> | 2018-05-05 01:57:00 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-05-05 01:57:00 +0000 |
commit | 781aa181abddaa26c9f9bb06340f314d30095e50 (patch) | |
tree | e688ca627d6a38eb63f51d2ef61db02fc635866e /llvm/lib/CodeGen | |
parent | 00d83601b47dab3fb2893db2647964b568a045e3 (diff) | |
download | bcm5719-llvm-781aa181abddaa26c9f9bb06340f314d30095e50.tar.gz bcm5719-llvm-781aa181abddaa26c9f9bb06340f314d30095e50.zip |
Fix a bunch of places where operator-> was used directly on the return from dyn_cast.
Inspired by r331508, I did a grep and found these.
Mostly just change from dyn_cast to cast. Some cases also showed a dyn_cast result being converted to bool, so those I changed to isa.
llvm-svn: 331577
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index a6a020e8361..28ccb2a5a75 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -16933,14 +16933,14 @@ bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS, const ConstantFPSDNode *Zero = nullptr; if (TheSelect->getOpcode() == ISD::SELECT_CC) { - CC = dyn_cast<CondCodeSDNode>(TheSelect->getOperand(4))->get(); + CC = cast<CondCodeSDNode>(TheSelect->getOperand(4))->get(); CmpLHS = TheSelect->getOperand(0); Zero = isConstOrConstSplatFP(TheSelect->getOperand(1)); } else { // SELECT or VSELECT SDValue Cmp = TheSelect->getOperand(0); if (Cmp.getOpcode() == ISD::SETCC) { - CC = dyn_cast<CondCodeSDNode>(Cmp.getOperand(2))->get(); + CC = cast<CondCodeSDNode>(Cmp.getOperand(2))->get(); CmpLHS = Cmp.getOperand(0); Zero = isConstOrConstSplatFP(Cmp.getOperand(1)); } diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 486b5430537..86c6c054264 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -3726,7 +3726,7 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) { if (Tmp2.isUndef() || (Tmp2.getOpcode() == ISD::AND && isa<ConstantSDNode>(Tmp2.getOperand(1)) && - dyn_cast<ConstantSDNode>(Tmp2.getOperand(1))->getZExtValue() == 1)) + cast<ConstantSDNode>(Tmp2.getOperand(1))->getZExtValue() == 1)) Tmp3 = Tmp2; else Tmp3 = DAG.getNode(ISD::AND, dl, Tmp2.getValueType(), Tmp2, diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index c00a72753e1..f8ccb9cbbab 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -1369,7 +1369,7 @@ static void propagateSwiftErrorVRegs(FunctionLoweringInfo *FuncInfo) { } auto DLoc = isa<Instruction>(SwiftErrorVal) - ? dyn_cast<Instruction>(SwiftErrorVal)->getDebugLoc() + ? cast<Instruction>(SwiftErrorVal)->getDebugLoc() : DebugLoc(); const auto *TII = FuncInfo->MF->getSubtarget().getInstrInfo(); |