diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-01-06 21:34:26 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-01-06 21:34:26 +0000 |
| commit | d215fd3b74b90f5dc1964610926fcc2a20f959aa (patch) | |
| tree | 0c9f21e40eae033d6760008729f37d2103e2c654 /lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp | |
| parent | b8a2042aa938069e862750553db0e4d82d25822c (diff) | |
Vendor import of llvm release_60 branch r321788:vendor/llvm/llvm-release_60-r321788
Notes
svn path=/vendor/llvm/dist-release_60/; revision=327639
svn path=/vendor/llvm/llvm-release_60-r321788/; revision=327640; tag=vendor/llvm/llvm-release_60-r321788
Diffstat (limited to 'lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp')
| -rw-r--r-- | lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp b/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp index fd602257934a..2646d0bcbf47 100644 --- a/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp +++ b/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp @@ -1050,14 +1050,11 @@ bool PolynomialMultiplyRecognize::promoteTypes(BasicBlock *LoopB, // Check if the exit values have types that are no wider than the type // that we want to promote to. unsigned DestBW = DestTy->getBitWidth(); - for (Instruction &In : *ExitB) { - PHINode *P = dyn_cast<PHINode>(&In); - if (!P) - break; - if (P->getNumIncomingValues() != 1) + for (PHINode &P : ExitB->phis()) { + if (P.getNumIncomingValues() != 1) return false; - assert(P->getIncomingBlock(0) == LoopB); - IntegerType *T = dyn_cast<IntegerType>(P->getType()); + assert(P.getIncomingBlock(0) == LoopB); + IntegerType *T = dyn_cast<IntegerType>(P.getType()); if (!T || T->getBitWidth() > DestBW) return false; } |
