[llvm] [DirectX] Do not flatten GEP chains for unsupported types (PR #150484)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 24 12:26:48 PDT 2025
================
@@ -263,8 +263,13 @@ bool DXILFlattenArraysVisitor::visitGetElementPtrInst(GetElementPtrInst &GEP) {
// merge the byte offsets. Otherwise, this GEP is itself the root of a GEP
// chain and we need to deterine the root array type
if (auto *PtrOpGEP = dyn_cast<GEPOperator>(PtrOperand)) {
- assert(GEPChainInfoMap.contains(PtrOpGEP) &&
- "Expected parent GEP to be visited before this GEP");
+
+ // If the parent GEP was not processed, then we do not want to process its
----------------
farzonl wrote:
The comment makes sense as does the fix, Was wondering should we have something more explict about type checking for structs and bailing?
https://github.com/llvm/llvm-project/pull/150484
More information about the llvm-commits
mailing list