[all-commits] [llvm/llvm-project] ecec79: [mlir][func] Move return-type verification from Re...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Tue Mar 3 03:18:49 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ecec7920c636082708b80d6a603e8d5d7eb5b0a7
      https://github.com/llvm/llvm-project/commit/ecec7920c636082708b80d6a603e8d5d7eb5b0a7
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2026-03-03 (Tue, 03 Mar 2026)

  Changed paths:
    M mlir/include/mlir/Dialect/Func/IR/FuncOps.td
    M mlir/lib/Dialect/Func/IR/FuncOps.cpp
    M mlir/test/Conversion/FuncToLLVM/func-memref-return.mlir
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm-32b.mlir
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Dialect/EmitC/invalid_types.mlir
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Dialect/LLVMIR/nvvm.mlir
    M mlir/test/Dialect/Linalg/invalid.mlir
    M mlir/test/Dialect/NVGPU/invalid.mlir
    M mlir/test/Dialect/SparseTensor/invalid.mlir
    M mlir/test/Dialect/Tosa/invalid.mlir
    M mlir/test/Dialect/Vector/invalid.mlir
    M mlir/test/Transforms/print-op-graph.mlir
    M mlir/test/Transforms/test-dialect-conversion-pdll.mlir
    M mlir/test/Transforms/test-legalizer.mlir
    M mlir/test/Transforms/test-merge-blocks.mlir
    M mlir/test/Transforms/test-pattern-selective-replacement.mlir

  Log Message:
  -----------
  [mlir][func] Move return-type verification from ReturnOp to FuncOp (#184153)

Move the operand count and type checks for func.return from
ReturnOp::verify() into a new FuncOp::verify(). The verifier iterates
all blocks in the callable region, skipping terminators that are not
func.return (e.g. llvm.return or test.return that may appear during
dialect conversion).

Fix several invalid-IR tests that had func.func return types
inconsistent with the actual func.return operands. Previously these
mismatches were silent because block verification stopped at an earlier
expected error before reaching the func.return; now that
FuncOp::verify() runs before body verification, the return types must be
consistent.



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