Skip to content

Commit 543b30d

Browse files
committed
[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
1 parent fe9403d commit 543b30d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/VE/VEISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ bool VEDAGToDAGISel::selectADDRzii(SDValue Addr, SDValue &Base, SDValue &Index,
236236
Addr.getOpcode() == ISD::TargetGlobalTLSAddress)
237237
return false; // direct calls.
238238

239-
if (ConstantSDNode *CN = cast<ConstantSDNode>(Addr)) {
239+
if (auto *CN = dyn_cast<ConstantSDNode>(Addr)) {
240240
if (isInt<32>(CN->getSExtValue())) {
241241
Base = CurDAG->getTargetConstant(0, SDLoc(Addr), MVT::i32);
242242
Index = CurDAG->getTargetConstant(0, SDLoc(Addr), MVT::i32);

0 commit comments

Comments
 (0)