[llvm-branch-commits] [DirectX] Lower `@llvm.dx.typedBufferStore` to DXIL ops (PR #104253)
Justin Bogner via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Sep 9 13:46:41 PDT 2024
================
@@ -388,10 +432,13 @@ class OpLowerer {
case Intrinsic::dx_typedBufferLoad:
lowerTypedBufferLoad(F);
break;
+ case Intrinsic::dx_typedBufferStore:
+ lowerTypedBufferStore(F);
+ break;
}
Updated = true;
}
- if (Updated)
+ if (Updated && !HasErrors)
----------------
bogner wrote:
It can fail in the same ways any of the op lowering can fail (like say if we just give it completely incorrect types) but I think it happens to always fail in such a way that the cleanup wouldn't crash. The HasErrors check is added here so that we can carry on and finish the pass and just let LLVM's error handling propagate the error afterwards, because when `lowerTypedBufferStore` fails it can leave the temporary casts in a bad state.
All that said, we can and should add some tests for cases where lowering loads fails. I'll do that in a follow up change.
https://github.com/llvm/llvm-project/pull/104253
More information about the llvm-branch-commits
mailing list