[llvm] [DirectX] Make dx.RawBuffer an op that can't be replaced (PR #154620)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 21 08:45:22 PDT 2025


================
@@ -3852,6 +3852,10 @@ bool llvm::canReplaceOperandWithVariable(const Instruction *I, unsigned OpIdx) {
   if (I->isLifetimeStartOrEnd())
     return false;
 
+  if (auto *TT = dyn_cast<TargetExtType>(Op->getType());
----------------
bogner wrote:

@nikic summarized the options here: https://github.com/llvm/llvm-project/pull/153858#issuecomment-3198057701

I would think we add an appropriate property for target extension types [here](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/IR/DerivedTypes.h#L840-L853), and then make sure that that property is set appropriately in [getTargetTypeInfo](https://github.com/llvm/llvm-project/blob/main/llvm/lib/IR/Type.cpp#L982)

https://github.com/llvm/llvm-project/pull/154620


More information about the llvm-commits mailing list