[all-commits] [llvm/llvm-project] 68e1ae: [MemRefToLLVM] Fix the lowering of memref.assume_a...

qcolombet via All-commits all-commits at lists.llvm.org
Tue Apr 25 21:10:07 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 68e1aef68e40452b6c176b25e67c13a0359c96ca
  Author: Quentin Colombet <quentin.colombet at gmail.com>
  Date:   2023-04-26 (Wed, 26 Apr 2023)

  Changed paths:
    M mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
    M mlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir

  Log Message:
  [MemRefToLLVM] Fix the lowering of memref.assume_alignment

`memref.assume_alignment` annotates the alignment of the source buffer
not the base pointer.
Put diffrently, prior to this patch `memref.assume_alignment` would lower
to `llvm.assume %buffer.base.isAligned(X)` whereas what we want is
`llvm.assume (%buffer.base + %buffer.offset).isAligned(X)`.
In other words, we were missing to include the offset in the expression
checked by the `llvm.assume`.

Differential Revision: https://reviews.llvm.org/D148930

More information about the All-commits mailing list