[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
This commit is contained in:
Craig Topper 2018-05-04 01:04:24 +00:00
parent 07580ffe47
commit 8304231508
1 changed files with 2 additions and 2 deletions

View File

@ -1372,13 +1372,13 @@ bool LoopIdiomRecognize::recognizeAndInsertCTLZ() {
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;
}