anemet wrote: Certainly the right direction but can you explain how do we end up modifying the entry in ShapeMap if we already went through `updateShapeAndReplaceAllUsesWith` https://github.com/llvm/llvm-project/pull/118282