[llvm] [SLP] Extract isIdentityOrder to common routine [probably NFC] (PR #106582)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 09:50:01 PDT 2024
================
@@ -1364,6 +1364,19 @@ class BoUpSLP {
/// Perform LICM and CSE on the newly generated gather sequences.
void optimizeGatherSequence();
+ /// Does this non-empty order represent an identity order? Identity
+ /// should be represented as an empty order, so this is used to
+ /// decide if we can canonicalize a computed order. Undef elements
+ /// (represented as size) are ignored.
+ bool IsIdentityOrder(ArrayRef<unsigned> Order) const {
+ assert(!Order.empty());
----------------
alexey-bataev wrote:
Add assertion message
https://github.com/llvm/llvm-project/pull/106582
More information about the llvm-commits
mailing list