<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/130197>130197</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [CIR] Upstream support for array types
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            ClangIR
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          andykaylor
      </td>
    </tr>
</table>

<pre>
    ### Overview
Upstream the basic support for array variable types. The initial change should just add support for declaring and initializing global variables that are arrays of existing scalar types. Follow-up patches can add support for local variables, including dynamic-size arrays, and accessing arrays using the cir.ptr_stride operation.

### Suggested minimal test case
```
// Global
int a[10];
int b[10] = {};
int c[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
```

### Existing incubator tests
clang/test/CIR/CodeGen/array.c (struct test case will need to be deferred)
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxkU01v4yAQ_TX4Mopl4zixDz4kzbra00r7cV4NMLHpErAAp5v--hVukrZbCT0LmHnz5pnBEPRgiTpW71l9yHCOo_MdWnX5gxfjfCacunSMV68Lvp3JnzU9s2L3awrRE54gjgQCg5YQ5mlyPsLReUDv8QJn9BqFIYiXiUIOP0cCbXXUaECOaAeCMLrZKHiaQwRU6gOJImnQazsAWnVL1C_pYDBOoLkXCBBHjICeXisHcEegvzrEFBwkGvQ3Eb0zxj2v5gkmjHKkABLtp9rGyff8jD-AttLMKhGqi8WTlqugX24FU0BSiVJSCIvmVyHzskkuSe3zKfrfIXqtCNxEHqN2NmfFLq27zT_mYaAQScFJW31CA5FCBImBUtymuK6U0zPew-PiBit22kZAVu_LgtUHVu2vR-J2BKw6ANvu2fbdrfz_ForUTZmAJ6gSrBPUCTYJtgmaBC3c2T5Ie9_Rl9uv0FbOAqPzS0uBFTtp0A6M92nPeP_w9XtCp-iRLOP94mIugfEmRD_L-OYFPGtjwBIpiA4EgaIjeU-K8TZTXaXaqsWMunK7Lqui5NsqGzvR8jWvN6IlSWUrZN0ceaPajahFKZu6zHTHC14XVbHhfL2tq1w1Vd2suTqqpuIll2xd0Am1yY05n3Lnh0yHMFOXarTbzKAgE5aR4vwhNZc64mm-fJdSVmIeAlsXRocY3kiijmaZxORAfYD7gH0eq-UhZ7M33RjjFFh1fQeDjuMsculOjPeJ-PpZTd49kUz2LlID4_1V7bnj_wIAAP__IIJIdA">