[Mlir-commits] [mlir] [mlir][sparse] partially support lowering sparse coiteration loops to scf.while/for. (PR #105565)
Aart Bik
llvmlistbot at llvm.org
Thu Aug 22 15:16:58 PDT 2024
================
@@ -96,24 +96,32 @@ class I64BitSet {
return *this;
}
+ bool isSubSetOf(const I64BitSet p) const {
+ I64BitSet tmp = *this;
+ tmp |= p;
+ return tmp == p;
+ }
+
// Needed by `llvm::const_set_bits_iterator_impl`.
int find_first() const { return min(); }
int find_next(unsigned prev) const {
- if (prev >= max())
+ if (prev >= max() - 1)
return -1;
- uint64_t b = storage >> (prev + 1);
- if (b == 0)
- return -1;
+ uint64_t b = storage >> (prev + 1ULL);
----------------
aartbik wrote:
avoid portability headaches with just static_cast<int64_t>(1) ?
also below?
https://github.com/llvm/llvm-project/pull/105565
More information about the Mlir-commits
mailing list