[PATCH] D83567: [DAGCombiner] allow load/store merging if pairs can be rotated into place

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 05:48:04 PDT 2020


spatel added a comment.

In D83567#2146679 <https://reviews.llvm.org/D83567#2146679>, @RKSimon wrote:

> LGTM - I'm curious whether rotates across more load/stores would be useful or not: https://gcc.godbolt.org/z/196ar9


It's hard to say without a real app to show the usefulness. We're reducing instructions, but creating a longer critical path here, so the profitability of even the basic case will depend on uarch/benchmark.

"reverse_edge4_2()" in the godbolt example is effectively the same as the  "rotate64_iterate()" regression test , so we already get that one. But the "rotate32_consecutive()" regression test shows a gap in our merging ability.

Compile-time may be another consideration on how far we should take this. IIRC, the existing merging code could cause noticeable slowdowns for large blocks with lots of memops.


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

https://reviews.llvm.org/D83567





More information about the llvm-commits mailing list