[all-commits] [llvm/llvm-project] 9ae537: [CIR] Replace nsw/nuw unit attrs with OverflowFlag...
Henrich Lauko via All-commits
all-commits at lists.llvm.org
Mon May 4 02:16:52 PDT 2026
Branch: refs/heads/users/xlauko/cir-overflow-bitflags
Home: https://github.com/llvm/llvm-project
Commit: 9ae5374f695d6f72f9844f241a79656b3488c202
https://github.com/llvm/llvm-project/commit/9ae5374f695d6f72f9844f241a79656b3488c202
Author: xlauko <xlauko at mail.muni.cz>
Date: 2026-05-04 (Mon, 04 May 2026)
Changed paths:
M clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
M clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
M clang/include/clang/CIR/Dialect/IR/CIREnumAttr.td
M clang/include/clang/CIR/Dialect/IR/CIROps.td
M clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
M clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerItaniumCXXABI.cpp
M clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
A clang/test/CIR/IR/invalid-overflow.cir
A clang/test/CIR/IR/overflow-flags.cir
Log Message:
-----------
[CIR] Replace nsw/nuw unit attrs with OverflowFlags BitEnum
Combine the separate `no_signed_wrap` and `no_unsigned_wrap` unit
properties on arithmetic ops into a single `OverflowFlags` BitEnum
(`nsw`, `nuw`). This allows combined flags to be written as
`nsw|nuw` in assembly, replaces the per-flag verification traits
with a single `OverflowFlagsRequireIntType` predicate, and folds
the two `HasAtMostOneOfAttrs` checks into one
`SatExclusiveWithOverflowFlags` predicate.
The bit layout matches `mlir::LLVM::IntegerOverflowFlags`, so
lowering casts the value directly and asserts the layout via
static_assert.
Updates IncOp/DecOp/MinusOp builders, CIRGenExprScalar, and
LowerItaniumCXXABI to the new API. Adds round-trip and
verification tests in clang/test/CIR/IR/.
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