[all-commits] [llvm/llvm-project] e692af: [MLIR] Update APInt construction to correctly set ...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Mon Oct 14 06:01:26 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e692af85966903614d470a7742ed89d124baf1a6
https://github.com/llvm/llvm-project/commit/e692af85966903614d470a7742ed89d124baf1a6
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-10-14 (Mon, 14 Oct 2024)
Changed paths:
M mlir/include/mlir/IR/BuiltinAttributes.td
M mlir/include/mlir/IR/OpImplementation.h
M mlir/lib/Conversion/TosaToArith/TosaToArith.cpp
M mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
M mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
M mlir/lib/IR/Builders.cpp
M mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp
M mlir/unittests/Dialect/SPIRV/SerializationTest.cpp
Log Message:
-----------
[MLIR] Update APInt construction to correctly set isSigned/implicitTrunc (#110466)
This fixes all the places in MLIR that hit the new assertion added in
#106524, in preparation for enabling it by default. That is, cases where
the value passed to the APInt constructor is not an N-bit
signed/unsigned integer, where N is the bit width and signedness is
determined by the isSigned flag.
The fixes either set the correct value for isSigned, or set the
implicitTrunc flag to retain the old behavior. I've left TODOs for the
latter case in some places, where I think that it may be worthwhile to
stop doing implicit truncation in the future.
Note that the assertion is currently still disabled by default, so this
patch is mostly NFC.
This is just the MLIR changes split off from
https://github.com/llvm/llvm-project/pull/80309.
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