[llvm] [llvm-diff] Add Commutativity on BinOp (PR #123314)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 02:15:56 PST 2025
https://github.com/nikic commented:
There is an IRNormalizer pass (used via `-passes=normalize`) that is intended for this use case: Normalize the IR before diffing to remove non-semantic differences.
I have never used it, but maybe it would be useful for your use case? It does seem to normalize commutative operands. The default behavior seems to include some aggressive renaming, so maybe use -norm-rename-all=0.
If that doesn't work, then I guess this approach adding an option to llvm-diff would be okay.
https://github.com/llvm/llvm-project/pull/123314
More information about the llvm-commits
mailing list