aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/R600/R600OptimizeVectorRegisters.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Target/R600/R600OptimizeVectorRegisters.cpp b/lib/Target/R600/R600OptimizeVectorRegisters.cpp
index 9d237bb..0c123a1 100644
--- a/lib/Target/R600/R600OptimizeVectorRegisters.cpp
+++ b/lib/Target/R600/R600OptimizeVectorRegisters.cpp
@@ -198,11 +198,9 @@ MachineInstr *R600VectorRegMerger::RebuildVector(
.addReg(SubReg)
.addImm(Chan);
UpdatedRegToChan[SubReg] = Chan;
- for (std::vector<unsigned>::iterator RemoveIt = UpdatedUndef.begin(),
- RemoveE = UpdatedUndef.end(); RemoveIt != RemoveE; ++ RemoveIt) {
- if (*RemoveIt == Chan)
- UpdatedUndef.erase(RemoveIt);
- }
+ UpdatedUndef.erase(
+ std::remove(UpdatedUndef.begin(), UpdatedUndef.end(), Chan),
+ UpdatedUndef.end());
DEBUG(dbgs() << " ->"; Tmp->dump(););
(void)Tmp;
SrcVec = DstReg;