[all-commits] [llvm/llvm-project] e559d4: [mlir][LLVM] Add the `byte` type to the LLVM diale...

Markus Böck via All-commits all-commits at lists.llvm.org
Tue Jun 16 01:58:22 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e559d43e47e1264962831f936d1ea56d0fd3465d
      https://github.com/llvm/llvm-project/commit/e559d43e47e1264962831f936d1ea56d0fd3465d
  Author: Markus Böck <markus.boeck02 at gmail.com>
  Date:   2026-06-16 (Tue, 16 Jun 2026)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
    M mlir/lib/Target/LLVMIR/TypeFromLLVM.cpp
    M mlir/lib/Target/LLVMIR/TypeToLLVM.cpp
    M mlir/test/Dialect/LLVMIR/layout.mlir
    M mlir/test/Dialect/LLVMIR/roundtrip.mlir
    M mlir/test/Dialect/LLVMIR/types-invalid.mlir
    M mlir/test/Dialect/LLVMIR/types.mlir
    M mlir/test/Target/LLVMIR/Import/basic.ll
    M mlir/test/Target/LLVMIR/llvmir.mlir

  Log Message:
  -----------
  [mlir][LLVM] Add the `byte` type to the LLVM dialect (#203795)

This PR ports the newly added `byte` type from LLVM IR to mlir's LLVM
dialect. The simplest motivation for the byte type is being able to
implement `memcpy` in LLVM IR. This was previously not possible: Due to
rules around conversions between integers and pointers (which e.g.
implicitly happen during loads), partial-poisons and pointer provenance
were not preserved. No alterantive types to integers existed that one
could use to have poison and provenance preserving SSA-values. The byte
type solves exactly this issue. Frontends are encouraged to use it when
needed for better optimization capabilities.

Currently, the only operation that has changed semantics around `byte`
is `bitcast`. Is now allows casting between `byte` and `ptr` (unlike
integers and pointers).

Corresponding LLVM commit:
https://github.com/llvm/llvm-project/commit/80f2ef70f592

Assisted by Claude & Gemini

---------

Co-authored-by: Fabian Mora <fmora.dev 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