[all-commits] [llvm/llvm-project] 79010e: [mlir] ArithToLLVM: fix memref bitcast lowering (#...

Ivan Butygin via All-commits all-commits at lists.llvm.org
Wed Feb 12 03:19:35 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 79010e2e4d0e27ee87887bfaef2c32e908c92a8e
      https://github.com/llvm/llvm-project/commit/79010e2e4d0e27ee87887bfaef2c32e908c92a8e
  Author: Ivan Butygin <ivan.butygin at gmail.com>
  Date:   2025-02-12 (Wed, 12 Feb 2025)

  Changed paths:
    M mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp
    M mlir/lib/Conversion/LLVMCommon/VectorPattern.cpp
    M mlir/test/Conversion/ArithToLLVM/arith-to-llvm.mlir

  Log Message:
  -----------
  [mlir] ArithToLLVM: fix memref bitcast lowering (#125148)

`arith.bitcast` is allowed on memrefs and such code can actually be
generated by IREE `ConvertBf16ArithToF32Pass`.
`LLVM::detail::vectorOneToOneRewrite` doesn't properly check its types
and will generate bitcast between structs which is illegal.

With the opaque pointers this is a no-op operation for memref so we can
just add type check in `LLVM::detail::vectorOneToOneRewrite` and add a
separate pattern which removes op if converted types are the same.



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