Depends On D82528
LGTM, modulo splitting into two ops and a nit.
can you use std::equal or check in STLExtras.h if we have a range version? That should make this more compact.
(actually, adding range_equal to STLExtras.h would be cool, then after splitting into two ops this could be just llvm::range_equal(lhs.cast<DenseIntElementsAttr>(), rhs.cast<DenseIntElementsAttr>()))
Turns out there is actually == defined on these.