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

    <tr>
        <th>Summary</th>
        <td>
            [MLIR][LLVM] Add verifiers to the LLVM dialect GEP operation
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir:llvm
      </td>
    </tr>

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

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

<pre>
    Me and others have stumbled over invalid GEP operations due to inconsistencies between element types and the indices uses to index into the pointer. LLVM IR has strict verifiers for this, while the LLVM dialect does not. This can lead to unexpected crashes after exporting LLVM dialect to LLVM IR.

Given that GEP is considered the most complicated instruction in LLVM IR, it would be sensible to introduce verification for the GEP's indices in MLIR.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxUklFvozoQhX-NeRkVgVNCeeAhvbmpKrXSVXW178YewqyMjTxD2v77lUm6u30BITxzzvl8DDOdA2KvmkfVHAuzyhRTf6RALCkWQ3Sf_SuCCQ6iTJgYJnNBYFnnwaODeMEEFC7Gk4Onf_-DuGAyQjEwuBVBIlCwMTCxYLCEDAPKO2IA9DhjEJDPBXlTkAmBgiOLDCsjX6cdfgAFidvvJVIQTCW8vPx4hec3mAwDSyIrcMFEI2WPY0wgE7HS_8D7RB632W3EkfFoBVxEhhClhP8nYrAmgEfjsuQa8GNBK-jAJsNTdjcKJsCPJSahcP6-SuKXm1JVR1Udrs8numAAmYxsYLJI5uAw4TXqHFnAxnnxZE1Wo8CSVpvpAYWvpTkECbzH1TsYEBgD0-BvbCVFt1q8hbcb-lt-zLpKt_wbKgV4fXl-KwvX71y360yBfb3vHnTdtF1bTL21LdatqbrBdq6tqrYeR633o2uqfYeNLajXld7VlW6q_W6_a8u2G2xd66Zr9Fi5qlX3Fc6GfOn9ZS5jOhfEvGLfVvX-ofBmQM9b27SePSW1O-SDSutcv9Tnj7thPbO6rzyx8J89QuK3ouYIqjmq5jETUs0RDs79dfu3qny7o2_VLNbk-0lkYbU7KH1S-nQmmdahtHFW-nR1tL3ulhR_ohWlT1sOVvq0RfkVAAD___VkFuU">