This patch takes advantage of the Commutative trait on operation to remove identical commutative operations where the operands are swapped. The second operation below can be removed since `arith.addi` is commutative. ``` %1 = arith.addi %a, %b : i32 %2 = arith.addi %b, %a : i32 ``` Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D123492
28 KiB
28 KiB