mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-21 18:22:53 +01:00
[MergeICmps] Try to fix MSVC build failure
Apparently this fails to line up the types -- try to sidestep the issue entirely by writing the code in a more reasonable way: Walk over the operands and perform a set lookup, rather than walking over the set and performing an operand scan.
This commit is contained in:
parent
24ba96f75f
commit
fa9a368e39
@ -256,11 +256,10 @@ bool BCECmpBlock::canSinkBCECmpInst(const Instruction *Inst,
|
||||
}
|
||||
// Make sure this instruction does not use any of the BCE cmp block
|
||||
// instructions as operand.
|
||||
for (auto BI : BlockInsts) {
|
||||
if (is_contained(Inst->operands(), BI))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return llvm::none_of(Inst->operands(), [&](const Value *Op) {
|
||||
const Instruction *OpI = dyn_cast<Instruction>(Op);
|
||||
return OpI && BlockInsts.contains(OpI);
|
||||
});
|
||||
}
|
||||
|
||||
void BCECmpBlock::split(BasicBlock *NewParent, AliasAnalysis &AA) const {
|
||||
|
Loading…
Reference in New Issue
Block a user