llvm-project
afc4af56 - [CIR] Fix array constant initialization with trailing zeros (#184933)

Commit
10 days ago
[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.
Author
Parents
Loading