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

    <tr>
        <th>Summary</th>
        <td>
            [DXIL] DXIL Flatten Arrays Pass crashing
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:DirectX
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          llvm-beanz
      </td>
    </tr>
</table>

<pre>
    Repro case: https://godbolt.org/z/b6xPsKfYG

The DXIL Flatten Arrays Pass is crashing if a struct survives and it tries to flatten an array inside a struct. While it is unlikely this will generate valid DXIL, we shouldn't crash.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx0kcFu2zwQBp-GuiwiyEvJjA466P8NFUF7CIoCTY-UuJK2YUiDSzl1nr6w67RAgZ542sHwGyvCSyDqVPOfQnyY4kouxaAQVXMo7JbXmDrvTy93I9nwVozRnbvPdEwRJiukdA9rzkdRulc4KByW6MbocxnTonB4UziM-x-P8nH-9kFVvar6LyvB4enhEwze5kwB-pTsWeDRigALTMnKymEBnsGC5LRNGWRLJz6RgA0OOENOTAI5wnyD2AD2wgEOwo5-X5bwdWVPlxsW2ILnZ_JnyCsLvLL3sFCgZDPByXp2VzOF_8Mrgaxx8y4oNPmXVFm4TrtWt7agbmcarc2-MaZYO0JjcW7ne91Meq4s0T3t0WmDNe5a3BXcYYVNZbDemQobU9baVbqpTVsZ2471qOqKXiz78rL1ZbyCRTbqdk1V73Xh7UhebpVGOz1TcEr3B0405adbrfdQ2yKqrjxLlj-4zNlfM19_2Bz-3eA9QLEl3_0Vl_O6jeUUXxQOF_TtuTum-J2mrHC4aovC4WZ-6vBnAAAA__8Ixsd3">