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

    <tr>
        <th>Summary</th>
        <td>
            Replace trivial copy constructor call with cir::CopyOp
        </td>
    </tr>

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

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

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

<pre>
    In ClangIR, we replaced a trivial copy constructor call with cir::CopyOp in the LoweringPrepare pass. `cir::CopyOp` is already upstreamed, but not used for that case.

Code in ClangIR: https://github.com/llvm/clangir/blob/823e943d1b9aaba0fc46f880c5a6ac8c29fc761d/clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp#L1537-L1550

Ref: https://github.com/llvm/llvm-project/pull/160999#discussion_r2388854615
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJycks1q5DgQx59GvogYfViydfCht4MhENgl7H0oS-W2BrUlJLlDv_3gDpmBnGbmVJeq-n_wg1L8ZUMcifqHqOcG9rrGPJ6u-RlvGGLC3MzR3ceXjZ4DbJeXNyLO9B1pxhTAoqNAa_Y3D4HamO7Uxq3UvNsaM7UQAn33daXWZyJPRJ7OMd3_TdRvtK5IX-M7Zr9d_suYICNNUEpLiWZf9olm1BcKISO4O91TqRnhiu4wM--VbrHSvaCjS8y0rlCphYItYSfCTufo8FD8DCBPdK01lUNBTERMF1_XfW5tvBIxhXA7hj2WfSZimkOciZgGIdF00vHZAMzAFtvpZRiYVaDBDlaYxfaau8_b45U_Ds9HZ9Ozh4C2EjH9n2ErS8zXQsT0pYHWpkSEfOVK9k-vXCn2EeENl9-zfYynlOP3D620h0DExDUzxhAhnS92L8XH7VsWchgG1WmuGjdKZ6SBBkfeKyMU17Jv1lEPs4NOcrEo2fXSON0j74We1cDdwofGj4IJxYxkvGeMm1bPupNmQacRoB8s6RhewYf2MNbGfGl8KTuOXPOOiSbAjKE86BPiJ2DiQDGPjyzzfimkY8GXWn49qb4GHN8-GPwLAJs9h_GP23xYL48-H-5vo_gRAAD__z1aC1o">