diff options
author | Farzon Lotfi <farzonlotfi@microsoft.com> | 2025-08-29 16:09:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-29 16:09:03 -0400 |
commit | 01c0a8409a21344c822deba9467bd9d547f6e5d8 (patch) | |
tree | 7e294541adfa283d3de8f0b0165608a0b1488370 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | 7fc5838a3476d56b2e72767f1277b73ac1350b0b (diff) | |
download | llvm-01c0a8409a21344c822deba9467bd9d547f6e5d8.zip llvm-01c0a8409a21344c822deba9467bd9d547f6e5d8.tar.gz llvm-01c0a8409a21344c822deba9467bd9d547f6e5d8.tar.bz2 |
[DirectX] Make dx.RawBuffer an op that can't be replaced (#154620)
fixes #152348
SimplifyCFG collapses raw buffer store from a if\else load into a
select.
This change prevents the TargetExtType dx.Rawbuffer from being replace
thus preserving the if\else blocks.
A further change was needed to eliminate the phi node before we process
Intrinsic::dx_resource_getpointer in DXILResourceAccess.cpp
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 9d759bc..b94ed7d 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -3839,7 +3839,7 @@ void llvm::maybeMarkSanitizerLibraryCallNoBuiltin( bool llvm::canReplaceOperandWithVariable(const Instruction *I, unsigned OpIdx) { const auto *Op = I->getOperand(OpIdx); // We can't have a PHI with a metadata or token type. - if (Op->getType()->isMetadataTy() || Op->getType()->isTokenTy()) + if (Op->getType()->isMetadataTy() || Op->getType()->isTokenLikeTy()) return false; // swifterror pointers can only be used by a load, store, or as a swifterror |