[all-commits] [llvm/llvm-project] c1ad40: [CIR] Accept a union whose members do not cover it...
Adam Smith via All-commits
all-commits at lists.llvm.org
Wed Sep 16 13:40:34 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c1ad400444cda8b601e0d6f83bf812d4fc8ced48
https://github.com/llvm/llvm-project/commit/c1ad400444cda8b601e0d6f83bf812d4fc8ced48
Author: Adam Smith <adams at nvidia.com>
Date: 2026-09-16 (Wed, 16 Sep 2026)
Changed paths:
M clang/include/clang/CIR/Dialect/IR/CIRTypes.td
M clang/lib/CIR/Dialect/IR/CIRTypes.cpp
M clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
M clang/test/CIR/CodeGen/call-conv-lowering-x86_64-empty.cpp
M clang/test/CIR/CodeGen/call-conv-lowering-x86_64-non-byval.cpp
A clang/test/CIR/CodeGen/call-conv-lowering-x86_64-union-no-span.cpp
A clang/test/CIR/CodeGen/call-conv-lowering-x86_64-union-tail-padding.c
M clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
M clang/test/CIR/Transforms/abi-lowering/x86_64-union.cir
Log Message:
-----------
[CIR] Accept a union whose members do not cover its declared size (#223594)
`union { unsigned Words[3]; void *Ptr; }` is 16 bytes because the
pointer's alignment rounds it up, and no member covers that size. The
pass refused to classify unions like that at all, so anything holding
one failed to compile. Tail padding doesn't change how an eightbyte
classifies, so this drops the precondition and classifies the union from
its own size.
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