[all-commits] [llvm/llvm-project] a8599a: [mlir][UBToLLVM] Do not arbitrarily restrict input...

Markus Böck via All-commits all-commits at lists.llvm.org
Mon Aug 28 08:19:09 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a8599ac242e2d08c3eb157ab9331d7a32c3483b0
  Author: Markus Böck <markus.bock+llvm at nextsilicon.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M mlir/lib/Conversion/UBToLLVM/UBToLLVM.cpp
    M mlir/test/Conversion/UBToLLVM/ub-to-llvm.mlir

  Log Message:
  [mlir][UBToLLVM] Do not arbitrarily restrict input types

The lowering pattern is currently restricted to integer, float and index types.
This is seemingly arbitrary, as `ub.poison` works for any input type. The lowering should therefore also work with any type that can be converted using the type converter.

This patch therefore simply removes that condition and adds a test ensuring that this works.

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

More information about the All-commits mailing list