[PATCH] D123569: [AMDGPU] Try to avoid inserting duplicate s_inst_prefetch

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 13 21:16:20 PDT 2022


critson added a comment.

In D123569#3445987 <https://reviews.llvm.org/D123569#3445987>, @rampitec wrote:

> Thanks! Did we ever run any benchmarking on this? I have written this before actual HW was available.

I was curious so did some quick investigation on GFX10.1 (Navi10).

For graphics at the macro scale, I cannot see any performance impact from entirely disabling generation of s_inst_prefetch instructions on our test suite.

Setting up a micro benchmark, I can see a >20% performance uplift setting an appropriate mode, and >20% performance drop for setting an inappropriate mode via s_inst_prefetch.
So these instructions definitely matter, but its an open question if we are using them effectively -- at least they don't seem to be hurting performance.
Additionally the cost of back-to-back s_inst_prefetch is the same as s_nop, so I would not expect to see change in performance for this patch, just saving a few redundant scalar instructions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123569



More information about the llvm-commits mailing list