[llvm] [DirectX] Fix the writing of ConstantExpr GEPs to DXIL bitcode (PR #154446)
Deric C. via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 21 15:53:05 PDT 2025
================
@@ -143,6 +143,10 @@ static bool fixI8UseChain(Instruction &I,
LoadInst *NewLoad = Builder.CreateLoad(ElementType, NewGEP);
ReplacedValues[Load] = NewLoad;
Load->replaceAllUsesWith(NewLoad);
+ Load->setOperand(Load->getPointerOperandIndex(),
+ PoisonValue::get(CE->getType()));
----------------
Icohedron wrote:
Resolved by not manually removing the CE and instead letting a later call to `removeDeadConstantUsers` on a global remove it automatically.
https://github.com/llvm/llvm-project/pull/154446
More information about the llvm-commits
mailing list