[llvm] [DirectX] Add support for Raw Buffer Loads and Stores for scalars and vectors of doubles and i64s in SM6.2 and earlier (PR #146627)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 2 11:39:31 PDT 2025
================
@@ -620,8 +649,12 @@ static bool expandTypedBufferLoadIntrinsic(CallInst *Orig) {
} else {
// Use of the check bit
assert(Indices[0] == 1 && "Unexpected type for typedbufferload");
- if (!CheckBit)
- CheckBit = Builder.CreateExtractValue(Load, {1});
+ if (!CheckBit) {
+ SmallVector<Value *, 2> CheckBits;
+ for (Value *L : Loads)
+ CheckBits.push_back(Builder.CreateExtractValue(L, {1}));
+ CheckBit = Builder.CreateAnd(CheckBits);
----------------
bogner wrote:
Might be worth a comment about the intentional difference from DXC. That is:
```c++
// Note: This does not always match the historical behaviour of DXC.
// See https://github.com/microsoft/DirectXShaderCompiler/issues/7622
```
https://github.com/llvm/llvm-project/pull/146627
More information about the llvm-commits
mailing list