From 543b30db06bf992c4b33ccba4e53e9905b101b7c Mon Sep 17 00:00:00 2001 From: "Kazushi (Jam) Marukawa" Date: Thu, 5 Nov 2020 10:32:34 +0900 Subject: [PATCH] [VE][NFC] Change cast to dyn_cast We used cast where we should use dyn_cast. So, change it this time. Old code cause problems if I implement brind instruction and compile openmp using new compiler. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D91151 --- llvm/lib/Target/VE/VEISelDAGToDAG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/VE/VEISelDAGToDAG.cpp b/llvm/lib/Target/VE/VEISelDAGToDAG.cpp index 1375964..dc7e118 100644 --- a/llvm/lib/Target/VE/VEISelDAGToDAG.cpp +++ b/llvm/lib/Target/VE/VEISelDAGToDAG.cpp @@ -236,7 +236,7 @@ bool VEDAGToDAGISel::selectADDRzii(SDValue Addr, SDValue &Base, SDValue &Index, Addr.getOpcode() == ISD::TargetGlobalTLSAddress) return false; // direct calls. - if (ConstantSDNode *CN = cast(Addr)) { + if (auto *CN = dyn_cast(Addr)) { if (isInt<32>(CN->getSExtValue())) { Base = CurDAG->getTargetConstant(0, SDLoc(Addr), MVT::i32); Index = CurDAG->getTargetConstant(0, SDLoc(Addr), MVT::i32); -- 2.7.4