[llvm] [DirectX] Implement `memcpy` in DXIL CBuffer Access pass (PR #144436)
Deric C. via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 19 17:03:20 PDT 2025
================
@@ -161,7 +164,12 @@ static void replaceAccessesWithHandle(GlobalVariable *Global,
}
// Otherwise, walk users looking for a load...
- ToProcess.append(Cur->user_begin(), Cur->user_end());
+ if (isa<GetElementPtrInst>(Cur) || isa<GEPOperator>(Cur)) {
+ ToProcess.append(Cur->user_begin(), Cur->user_end());
+ continue;
+ }
+
+ reportFatalInternalError("Unexpected user of Global");
----------------
Icohedron wrote:
I wanted the error to appear even if clang was compiled without assertions enabled so that it won't silently generate incorrect code. Realistically this error should never occur unless someone manually wrote IR to try to use a cbuffer global using an instruction other than a load or memcpy.
https://github.com/llvm/llvm-project/pull/144436
More information about the llvm-commits
mailing list