[all-commits] [llvm/llvm-project] 04ad8d: Emit inbounds and nuw attributes in memref. (#138984)

Peiyong Lin via All-commits all-commits at lists.llvm.org
Tue May 20 14:16:43 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 04ad8d4900fb4534a2120335e26d1a1a310ef256
      https://github.com/llvm/llvm-project/commit/04ad8d4900fb4534a2120335e26d1a1a310ef256
  Author: Peiyong Lin <linpyong at gmail.com>
  Date:   2025-05-20 (Tue, 20 May 2025)

  Changed paths:
    M mlir/include/mlir/Conversion/LLVMCommon/Pattern.h
    M mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
    M mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
    M mlir/lib/Conversion/ArmSMEToLLVM/ArmSMEToLLVM.cpp
    M mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp
    M mlir/lib/Conversion/LLVMCommon/Pattern.cpp
    M mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
    M mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Dialect/AMX/Transforms/LegalizeForLLVMExport.cpp
    M mlir/test/Conversion/FuncToLLVM/calling-convention.mlir
    M mlir/test/Conversion/MemRefToLLVM/convert-dynamic-memref-ops.mlir
    M mlir/test/Conversion/MemRefToLLVM/convert-static-memref-ops.mlir
    M mlir/test/Conversion/MemRefToLLVM/expand-then-convert-to-llvm.mlir

  Log Message:
  -----------
  Emit inbounds and nuw attributes in memref. (#138984)

Now that MLIR accepts nuw and nusw in getelementptr, this patch emits
the inbounds and nuw attributes when lower memref to LLVM in load and
store operators.

This patch also strengthens the memref.load and memref.store spec about
undefined behaviour during lowering.

This patch also lifts the |rewriter| parameter in getStridedElementPtr
ahead so that LLVM::GEPNoWrapFlags can be added at the end with a
default value and grouped together with other operators' parameters.

Signed-off-by: Lin, Peiyong <linpyong at gmail.com>



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