[PATCH] D148930: [MemRefToLLVM] Fix the lowering of memref.assume_alignment

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 21 09:55:06 PDT 2023


qcolombet added a subscriber: mravishankar.
qcolombet added inline comments.


================
Comment at: mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp:372
     Value ptrValue = rewriter.create<LLVM::PtrToIntOp>(loc, intPtrType, ptr);
     rewriter.create<LLVM::AssumeOp>(
         loc, rewriter.create<LLVM::ICmpOp>(
----------------
I was talking with @mravishankar offline and he pointed out that if we are aligned at (alignPtr + offset) then alignPtr must be aligned at least with the same alignment.
I.e., we could issue two assumes here:
- one for the aligned base pointer.
- one for the aligned base pointer + offset.

It sounded like useful information to lower.

What do you guys think?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148930/new/

https://reviews.llvm.org/D148930



More information about the llvm-commits mailing list