[PATCH] D42079: AMDGPU: Add a function attribute that shrinks buggy s_buffer opcodes on GFX9
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 15 10:06:27 PST 2018
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/SIMachineFunctionInfo.cpp:165-166
+ if (F.hasFnAttribute("amdgpu-shrink-buggy-sbuffer-opcodes"))
+ ShrinkBuggySBufferLoadStoreAtomicxN = true;
+
----------------
I don't understand why the function attribute for a hardware bug. If this happens to help other targets not working around the bug we should add an optimization to do this somewhere.
================
Comment at: lib/Target/AMDGPU/SIShrinkInstructions.cpp:310-312
+ if (ST.hasBuggySBufferLoadStoreAtomicxN() &&
+ MFI->shrinkBuggySBufferLoadStoreAtomicxN() &&
+ TII->isSMRD(MI.getOpcode())) {
----------------
We shouldn't be putting bug workarounds in an optimization pass. This should probably be part of the initial selection
Repository:
rL LLVM
https://reviews.llvm.org/D42079
More information about the llvm-commits
mailing list