[llvm] r331498 - [LoopIdiomRecognize] Turn two uncheck dyn_casts into regular casts.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu May 3 18:04:24 PDT 2018
Author: ctopper
Date: Thu May 3 18:04:24 2018
New Revision: 331498
URL: http://llvm.org/viewvc/llvm-project?rev=331498&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp?rev=331498&r1=331497&r2=331498&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp Thu May 3 18:04:24 2018
@@ -1372,13 +1372,13 @@ bool LoopIdiomRecognize::recognizeAndIns
bool IsCntPhiUsedOutsideLoop = false;
for (User *U : CntPhi->users())
- if (!CurLoop->contains(dyn_cast<Instruction>(U))) {
+ if (!CurLoop->contains(cast<Instruction>(U))) {
IsCntPhiUsedOutsideLoop = true;
break;
}
bool IsCntInstUsedOutsideLoop = false;
for (User *U : CntInst->users())
- if (!CurLoop->contains(dyn_cast<Instruction>(U))) {
+ if (!CurLoop->contains(cast<Instruction>(U))) {
IsCntInstUsedOutsideLoop = true;
break;
}
More information about the llvm-commits
mailing list