[clang] [CIR] Handle empty unions in record lowering (PR #172666)

2025-12-20 Thread Akimasa Watanuki via cfe-commits
https://github.com/Men-cotton updated https://github.com/llvm/llvm-project/pull/172666 >From b19f14a588d3e5e7b47713c9081bd1b6ee2c9ba1 Mon Sep 17 00:00:00 2001 From: mencotton Date: Wed, 17 Dec 2025 23:03:09 +0900 Subject: [PATCH 1/3] [CIR] Handle empty unions in record lowering --- clang/lib/

[clang] [CIR] Make cir.alloca alignment mandatory with default 0 (PR #172663)

2025-12-19 Thread Akimasa Watanuki via cfe-commits
https://github.com/Men-cotton edited https://github.com/llvm/llvm-project/pull/172663 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Handle optional alignment in alloca lowering (PR #172663)

2025-12-19 Thread Akimasa Watanuki via cfe-commits
https://github.com/Men-cotton edited https://github.com/llvm/llvm-project/pull/172663 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Handle optional alignment in alloca lowering (PR #172663)

2025-12-18 Thread Akimasa Watanuki via cfe-commits
https://github.com/Men-cotton updated https://github.com/llvm/llvm-project/pull/172663 >From 326addd57e92ad32094d4c81b412e279ee2ad130 Mon Sep 17 00:00:00 2001 From: mencotton Date: Wed, 17 Dec 2025 21:28:59 +0900 Subject: [PATCH 1/3] [CIR] Handle optional alignment in alloca lowering --- clan

[clang] [CIR] Handle optional alignment in alloca lowering (PR #172663)

2025-12-18 Thread Akimasa Watanuki via cfe-commits
Men-cotton wrote: > @Men-cotton How did you encounter the crash you are fixing here? Fuzz testing? I found this crash via `./build/bin/cir-opt --cir-to-llvm clang/test/CIR/IR/types.cir`. https://github.com/llvm/clangir/blob/main/clang/test/CIR/IR/types.cir https://github.com/llvm/llvm-project/

[clang] [CIR] Handle optional alignment in alloca lowering (PR #172663)

2025-12-17 Thread Akimasa Watanuki via cfe-commits
https://github.com/Men-cotton updated https://github.com/llvm/llvm-project/pull/172663 >From 326addd57e92ad32094d4c81b412e279ee2ad130 Mon Sep 17 00:00:00 2001 From: mencotton Date: Wed, 17 Dec 2025 21:28:59 +0900 Subject: [PATCH 1/2] [CIR] Handle optional alignment in alloca lowering --- clan

[clang] [CIR] Handle empty unions in record lowering (PR #172666)

2025-12-17 Thread Akimasa Watanuki via cfe-commits
https://github.com/Men-cotton created https://github.com/llvm/llvm-project/pull/172666 Handles empty unions (`cir.record`) by generating empty LLVM structs. This ensures successful lowering without triggering crashes in `getLargestMember` due to missing members. Added regression test in `clan

[clang] [CIR] Handle optional alignment in alloca lowering (PR #172663)

2025-12-17 Thread Akimasa Watanuki via cfe-commits
https://github.com/Men-cotton created https://github.com/llvm/llvm-project/pull/172663 Fixed a crash in `CIRToLLVMAllocaOpLowering` where `cir.alloca` operations without an explicit alignment attribute failed. The alignment now defaults to 0 if the attribute is missing. Added a regression tes