[all-commits] [llvm/llvm-project] afc4af: [CIR] Fix array constant initialization with trail...
Andy Kaylor via All-commits
all-commits at lists.llvm.org
Fri Mar 6 10:39:33 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: afc4af56ac63df493ed86c437ba0f0b08d53f555
https://github.com/llvm/llvm-project/commit/afc4af56ac63df493ed86c437ba0f0b08d53f555
Author: Andy Kaylor <akaylor at nvidia.com>
Date: 2026-03-06 (Fri, 06 Mar 2026)
Changed paths:
M clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp
M clang/lib/CIR/Dialect/IR/CIRAttrs.cpp
M clang/test/CIR/CodeGen/array.cpp
A clang/test/CIR/IR/invalid-const-array.cir
Log Message:
-----------
[CIR] Fix array constant initialization with trailing zeros (#184933)
If an array is explicitly initialized with more than eight non-zero
values followed by a number of explicit zero initializers, CIR generates
a constant record initializer with a constant array that is declared as
the size of the non-zero initializers but with the explicit zero
initializers included in the array initialization attribute. This
resulted in an error when we tried to lower that attribute to LLVM IR.
This patch fixes that problem and adds a verifier to ConstantArrayAttr
to check for that condition.
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