[llvm] [SLP] Fix isCommutative to check uses of the original instruction instead of the converted instruction. (PR #143094)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 6 02:49:10 PDT 2025


================
@@ -511,15 +511,15 @@ static bool isSplat(ArrayRef<Value *> VL) {
 }
 
 /// \returns True if \p I is commutative, handles CmpInst and BinaryOperator.
-static bool isCommutative(Instruction *I) {
+static bool isCommutative(Instruction *I, Instruction *InstWithUses) {
----------------
alexey-bataev wrote:

Need to update the description for the function

https://github.com/llvm/llvm-project/pull/143094


More information about the llvm-commits mailing list