llvm-project
07db8ecc - [mlir][LLVM] Mark and/or/xor/fadd/fmul as Commutative (#248882)

Commit
22 hours ago
[mlir][LLVM] Mark and/or/xor/fadd/fmul as Commutative (#248882) LLVM IR treats Add, FAdd, Mul, FMul, And, Or and Xor as commutative (Instruction::isCommutative()), but in the LLVM dialect only llvm.add and llvm.mul carry the Commutative trait. As a result, CSE fails to merge e.g. `llvm.and %a, %b` and `llvm.and %b, %a`. Add the Commutative trait to the remaining ops. Fixes: https://github.com/llvm/llvm-project/issues/248815
Author
Parents
Loading