================
@@ -384,16 +468,17 @@ bool LLVM::GEPOp::canRewire(const 
DestructurableMemorySlot &slot,
   // dynamic indices can never be properly rewired.
   if (!getDynamicIndices().empty())
     return false;
+  //// TODO: This is not necessary, I think.
+  // if (slot.elemType != getElemType())
+  //   return false;
----------------
gysit wrote:

This seem to be a debug left over and the condition seems to be checked above?

Maybe not in this PR, but should we use the data layout here as well instead of 
checking the element type. I.e. we could compute the offset of the GEP and then 
check if the offset points to the beginning of a subelement (of the slot and 
maybe also of a nested slot).

https://github.com/llvm/llvm-project/pull/85813
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to