mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Vincent says the element is at most once in the vector, so we don't need a full std::remove.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183541 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
149d1a1894
commit
2e0cebd881
@ -198,9 +198,13 @@ MachineInstr *R600VectorRegMerger::RebuildVector(
|
||||
.addReg(SubReg)
|
||||
.addImm(Chan);
|
||||
UpdatedRegToChan[SubReg] = Chan;
|
||||
UpdatedUndef.erase(
|
||||
std::remove(UpdatedUndef.begin(), UpdatedUndef.end(), Chan),
|
||||
UpdatedUndef.end());
|
||||
std::vector<unsigned>::iterator ChanPos =
|
||||
std::find(UpdatedUndef.begin(), UpdatedUndef.end(), Chan);
|
||||
if (ChanPos != UpdatedUndef.end())
|
||||
UpdatedUndef.erase(ChanPos);
|
||||
assert(std::find(UpdatedUndef.begin(), UpdatedUndef.end(), Chan) ==
|
||||
UpdatedUndef.end() &&
|
||||
"UpdatedUndef shouldn't contain Chan more than once!");
|
||||
DEBUG(dbgs() << " ->"; Tmp->dump(););
|
||||
(void)Tmp;
|
||||
SrcVec = DstReg;
|
||||
|
Loading…
Reference in New Issue
Block a user