[all-commits] [llvm/llvm-project] da0ded: [X86] Fix CodeGen crash for arrays of empty struct...
MaoJian via All-commits
all-commits at lists.llvm.org
Wed Sep 23 14:28:17 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: da0ded191f82be4ae98eb6eefc01175bd0855ca8
https://github.com/llvm/llvm-project/commit/da0ded191f82be4ae98eb6eefc01175bd0855ca8
Author: MaoJian <maojian16 at huawei.com>
Date: 2026-09-23 (Wed, 23 Sep 2026)
Changed paths:
M clang/lib/CodeGen/Targets/X86.cpp
A clang/test/CodeGen/X86/empty-struct-union-array.c
Log Message:
-----------
[X86] Fix CodeGen crash for arrays of empty structs and unions (#224203)
getFPTypeAtOffset() divides by the allocation size of an array element
when normalizing IROffset. Empty structs and unions have zero allocation
size, so arrays of these types can cause a division-by-zero during X86
ABI lowering.
Return nullptr for zero-sized array elements and add CodeGen tests for
empty struct and union arrays.
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