forked from OSchip/llvm-project
[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:
parent
fe9403df06
commit
543b30db06
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue