From f58ef87bb789bece7cba04925756814b903b3740 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 2 Jun 2019 03:31:01 +0000 Subject: [PATCH] [DAGCombiner] Replace two unchecked dyn_casts with casts. The results of the dyn_casts were immediately dereferenced on the next line so they had better not be null. I don't think there's any way for these dyn_casts to fail, so use a cast of adding null check. llvm-svn: 362315 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 773e0281b173..4ed17440abc0 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -8068,7 +8068,7 @@ SDValue DAGCombiner::visitMSTORE(SDNode *N) { if (Level >= AfterLegalizeTypes) return SDValue(); - MaskedStoreSDNode *MST = dyn_cast(N); + MaskedStoreSDNode *MST = cast(N); SDValue Mask = MST->getMask(); SDValue Data = MST->getValue(); EVT VT = Data.getValueType(); @@ -8219,7 +8219,7 @@ SDValue DAGCombiner::visitMLOAD(SDNode *N) { if (Level >= AfterLegalizeTypes) return SDValue(); - MaskedLoadSDNode *MLD = dyn_cast(N); + MaskedLoadSDNode *MLD = cast(N); SDValue Mask = MLD->getMask(); SDLoc DL(N);