[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
This commit is contained in:
Kazushi (Jam) Marukawa 2020-11-05 10:32:34 +09:00
parent fe9403df06
commit 543b30db06
1 changed files with 1 additions and 1 deletions

View File

@ -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<ConstantSDNode>(Addr)) {
if (auto *CN = dyn_cast<ConstantSDNode>(Addr)) {
if (isInt<32>(CN->getSExtValue())) {
Base = CurDAG->getTargetConstant(0, SDLoc(Addr), MVT::i32);
Index = CurDAG->getTargetConstant(0, SDLoc(Addr), MVT::i32);