[llvm] [SLP] NFC. Replace TreeEntry::setOperandsInOrder with VLOperands. (PR #113880)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 11:10:06 PDT 2024
================
@@ -2366,7 +2363,10 @@ class BoUpSLP {
}
/// \returns the number of operands.
- unsigned getNumOperands() const { return OpsVec.size(); }
+ /// reorder can only work on instructions with 2 operands. If we use
+ /// OpsVec.size() here, reorder will swap non-swappable operands (because
+ /// APO is a boolean value).
+ unsigned getNumOperands() const { return 2; }
----------------
alexey-bataev wrote:
I don't like this approach. I plan to extend the reordering to support many operands, better to avoid constant value here.
https://github.com/llvm/llvm-project/pull/113880
More information about the llvm-commits
mailing list