[all-commits] [llvm/llvm-project] d027ca: [fir] Lower to llvm int constants with appropriate...

Ivan R. Ivanov via All-commits all-commits at lists.llvm.org
Wed May 6 00:39:47 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d027cac061c76223bc1a001dcc2869021ec0d771
      https://github.com/llvm/llvm-project/commit/d027cac061c76223bc1a001dcc2869021ec0d771
  Author: Ivan R. Ivanov <iivanov at nvidia.com>
  Date:   2026-05-06 (Wed, 06 May 2026)

  Changed paths:
    M flang/lib/Optimizer/Support/Utils.cpp
    M flang/test/Fir/convert-to-llvm-openmp-and-fir.fir
    M flang/test/Fir/convert-to-llvm.fir
    M flang/test/Fir/global-initialization.fir
    M flang/test/Fir/logical-convert.fir
    M flang/test/Fir/tbaa.fir

  Log Message:
  -----------
  [fir] Lower to llvm int constants with appropriately typed int attrs (#195861)

When we lower fir operations to llvm int constants, we used to always
generate `llvm.mlir.constant`s with a i64 integer attribute regardless
of the width of the constant type. This made some llvm dialect level
folding hit assertions in some cases.

Fix this by generating the appropriately typed integer attributes
matching the constant type.



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