[PATCH] D135071: [AMDGPU] Implement TargetTransformInfo canAlwaysSinkRead

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 04:42:34 PDT 2022


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:1231-1232
+  if (Result && IsPixelShader) {
+    // Instructions using implicit derivatives in WQM cannot be safely sunk
+    // as kills/demotes may alter exec mask.
+    if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst)) {
----------------
It seems wrong that we have to handle this here. There should be some other mechanism to prevent sinking in this case, otherwise we would have pre-existing bugs. For example InstCombine will sink loads if it is not moving them past any stores.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135071



More information about the llvm-commits mailing list