[llvm] [SLP][NFC]Broader use of filter/isa ranges (PR #226535)
Ryan Buchner via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 11:57:11 PDT 2026
================
@@ -21006,30 +20971,29 @@ BoUpSLP::isGatherShuffledSingleRegisterEntry(
It->second = Res;
return Res;
};
- for (Value *V : VL) {
- if (isConstant(V) || !VisitedValue.insert(V).second)
- continue;
+ for (Value *V :
+ make_filter_range(dedup(VL), [](Value *V) { return !isConstant(V); })) {
----------------
bababuck wrote:
This will break I think. `DedupRange` will be temporary in this case in which case `Seen` will die and the iterators will have dangling pointers to `Seen`. Maybe make seen a `shared_ptr`?
https://github.com/llvm/llvm-project/pull/226535
More information about the llvm-commits
mailing list