[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 7 14:08:53 PDT 2025
================
@@ -29,8 +29,15 @@ int f[5] = {1, 2};
void func() {
int arr[10];
-
// CHECK: %[[ARR:.*]] = cir.alloca !cir.array<!s32i x 10>, !cir.ptr<!cir.array<!s32i x 10>>, ["arr"]
+
+ int e = arr[1];
----------------
andykaylor wrote:
Can you add a test case for `arr[0]`? That's a special case in terms of resulting LLVM IR, but is still represented as an explicit ptr_stride in CIR.
https://github.com/llvm/llvm-project/pull/134536
More information about the cfe-commits
mailing list