[PATCH] D133422: [amdgpu] Expand all ConstantExpr users of LDS variables in instructions

Jon Chesterfield via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 08:29:35 PDT 2022


JonChesterfield added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp:208
+            // a no-op one to use
+            LLVMContext &Ctx = M.getContext();
+            IRBuilder<> Builder(Ctx);
----------------
JonChesterfield wrote:
> This needs a test case, though the implementation that was called into by replaceConstantUsesInFunction unconditionally dereferences it which suggests empty blocks don't get here in practice.
Oh, right. Basic blocks can't be empty - closest one can get is a branch, and in that case we have an instruction to insert before.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133422



More information about the llvm-commits mailing list