summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-05-04 01:04:24 +0000
committerCraig Topper <craig.topper@intel.com>2018-05-04 01:04:24 +0000
commit8304231508be050ef74dbfbb38406db7f051bf52 (patch)
tree78aa13ab7dc539df2a34307d06b5db76109ea3f4 /llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
parent07580ffe4705ae0f85659bf5c8a18afc0137353b (diff)
downloadbcm5719-llvm-8304231508be050ef74dbfbb38406db7f051bf52.tar.gz
bcm5719-llvm-8304231508be050ef74dbfbb38406db7f051bf52.zip
[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
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp4
1 files changed, 2 insertions, 2 deletions
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<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;
}
OpenPOWER on IntegriCloud