dtcxzyw wrote: Please add more tests if the motivation of this patch is to handle more commuted patterns. If this patch is NFC, I am confused why we cannot benefit from removing some duplicate logic. https://github.com/llvm/llvm-project/pull/81060