From 8304231508be050ef74dbfbb38406db7f051bf52 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 4 May 2018 01:04:24 +0000 Subject: [LoopIdiomRecognize] Turn two uncheck dyn_casts into regular casts. These are casts on users of a PHINode to Instruction. I think since PHINode is an Instruction any users would also be Instructions. At least a cast will give us an assertion if its wrong. llvm-svn: 331498 --- llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp') diff --git a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp index 59753579bc3..461c7a1ce98 100644 --- a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp +++ b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp @@ -1372,13 +1372,13 @@ bool LoopIdiomRecognize::recognizeAndInsertCTLZ() { bool IsCntPhiUsedOutsideLoop = false; for (User *U : CntPhi->users()) - if (!CurLoop->contains(dyn_cast(U))) { + if (!CurLoop->contains(cast(U))) { IsCntPhiUsedOutsideLoop = true; break; } bool IsCntInstUsedOutsideLoop = false; for (User *U : CntInst->users()) - if (!CurLoop->contains(dyn_cast(U))) { + if (!CurLoop->contains(cast(U))) { IsCntInstUsedOutsideLoop = true; break; } -- cgit v1.2.3