llvm-project
61907ebd - [Clang][CodeGen] Do not use the GEP result to infer offset and result type (#134221)

Commit
218 days ago
[Clang][CodeGen] Do not use the GEP result to infer offset and result type (#134221) If `CreateConstInBoundsGEP2_32` returns a constant null/gep, the cast to GetElementPtrInst will fail. This patch uses two static helpers `GEPOperator::accumulateConstantOffset/GetElementPtrInst::getIndexedType` to infer offset and result type instead of depending on the GEP result. This patch is extracted from https://github.com/llvm/llvm-project/pull/130734.
Author
Parents
Loading