[clang] [CIR] Lower pointer const_array globals without insertvalue chains (PR #198427)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 2 16:53:44 PDT 2026


================
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
----------------
adams381 wrote:

The `@names` global is the case this PR changes: it's a `[3 x ptr]` whose elements are `global_view` (FlatSymbolRefAttr) constants. Before this PR those reached the per-element `llvm.insertvalue` path; now `lowerConstArrayAttr` emits a single flat array constant, which is what the `LLVM-NOT: insertvalue` after `@names` pins. The integer/string/bool/float globals were already bulk-lowered before this PR — they're here only so one file covers every base element type that reaches the helper, not because they change.


https://github.com/llvm/llvm-project/pull/198427


More information about the cfe-commits mailing list