aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Hexagon/HexagonGenExtract.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/Hexagon/HexagonGenExtract.cpp')
-rw-r--r--lib/Target/Hexagon/HexagonGenExtract.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/Target/Hexagon/HexagonGenExtract.cpp b/lib/Target/Hexagon/HexagonGenExtract.cpp
index bb5e379ce014..c99ad5130aef 100644
--- a/lib/Target/Hexagon/HexagonGenExtract.cpp
+++ b/lib/Target/Hexagon/HexagonGenExtract.cpp
@@ -197,13 +197,13 @@ bool HexagonGenExtract::convert(Instruction *In) {
// It is still ok to generate extract, but only if the mask eliminates
// those bits (i.e. M does not have any bits set beyond U).
APInt C = APInt::getHighBitsSet(BW, BW-U);
- if (M.intersects(C) || !APIntOps::isMask(W, M))
+ if (M.intersects(C) || !M.isMask(W))
return false;
} else {
// Check if M starts with a contiguous sequence of W times 1 bits. Get
// the low U bits of M (which eliminates the 0 bits shifted in on the
// left), and check if the result is APInt's "mask":
- if (!APIntOps::isMask(W, M.getLoBits(U)))
+ if (!M.getLoBits(U).isMask(W))
return false;
}
@@ -221,11 +221,8 @@ bool HexagonGenExtract::convert(Instruction *In) {
bool HexagonGenExtract::visitBlock(BasicBlock *B) {
// Depth-first, bottom-up traversal.
- DomTreeNode *DTN = DT->getNode(B);
- typedef GraphTraits<DomTreeNode*> GTN;
- typedef GTN::ChildIteratorType Iter;
- for (Iter I = GTN::child_begin(DTN), E = GTN::child_end(DTN); I != E; ++I)
- visitBlock((*I)->getBlock());
+ for (auto *DTN : children<DomTreeNode*>(DT->getNode(B)))
+ visitBlock(DTN->getBlock());
// Allow limiting the number of generated extracts for debugging purposes.
bool HasCutoff = ExtractCutoff.getPosition();