[PATCH] D75016: [X86][TwoAddressInstructionPass] Teach tryInstructionCommute to continue checking for commutable FMA operands in more cases.

Uday Bondhugula via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 05:03:02 PST 2020


bondhugula added a comment.

It's really nice to see this patch. I think the instruction sequence pattern that this has an impact on (the one in fma-commute-loop.ll and on the discourse post) is arguably the most important one for HPC! I tested this patch on the code generated from MLIR in the context of this experimentation: https://github.com/bondhugula/llvm-project/blob/hop/mlir/docs/HighPerfCodeGen.md#tweaking-m_c-k_c-m_r-n_r-to-maximize-reuse
and all the fma 213pd's shown in the llc assembly output are replaced by 231pd's.  It didn't have any impact on the performance though since the 213pds in that sequence didn't lead to any additional inter register shuffling, but FWIW, it's much more intuitive to see the same consistent set of registers due to usage of 231s there.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75016/new/

https://reviews.llvm.org/D75016





More information about the llvm-commits mailing list