[all-commits] [llvm/llvm-project] 1f4d6a: [mlir][bufferization] Avoid invalid memref.cast in...

pzoln via All-commits all-commits at lists.llvm.org
Sat Jul 18 04:59:07 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1f4d6acc935f93eca55cfef67348c8abcc1415db
      https://github.com/llvm/llvm-project/commit/1f4d6acc935f93eca55cfef67348c8abcc1415db
  Author: pzoln <pashka.zolnikov at gmail.com>
  Date:   2026-07-18 (Sat, 18 Jul 2026)

  Changed paths:
    M mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
    M mlir/test/Dialect/Bufferization/canonicalize.mlir

  Log Message:
  -----------
  [mlir][bufferization] Avoid invalid memref.cast in to_buffer folding (#208973)

Fixes #202782

When folding bufferization.to_buffer(bufferization.to_tensor(...)), only
create a memref.cast if the source and destination memref types are
cast-compatible.

This avoids asserting on unranked memrefs with different memory spaces
and leaves the original bufferization ops in place instead.

 Assisted-by: OpenAI Codex



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list