summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/RISCV
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-05-05 01:57:00 +0000
committerCraig Topper <craig.topper@intel.com>2018-05-05 01:57:00 +0000
commit781aa181abddaa26c9f9bb06340f314d30095e50 (patch)
treee688ca627d6a38eb63f51d2ef61db02fc635866e /llvm/lib/Target/RISCV
parent00d83601b47dab3fb2893db2647964b568a045e3 (diff)
downloadbcm5719-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/Target/RISCV')
-rw-r--r--llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
index 630439bb53c..b7d06879cad 100644
--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
@@ -93,7 +93,7 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
if (Opcode == ISD::FrameIndex) {
SDLoc DL(Node);
SDValue Imm = CurDAG->getTargetConstant(0, DL, XLenVT);
- int FI = dyn_cast<FrameIndexSDNode>(Node)->getIndex();
+ int FI = cast<FrameIndexSDNode>(Node)->getIndex();
EVT VT = Node->getValueType(0);
SDValue TFI = CurDAG->getTargetFrameIndex(FI, VT);
ReplaceNode(Node, CurDAG->getMachineNode(RISCV::ADDI, DL, VT, TFI, Imm));
OpenPOWER on IntegriCloud