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

    <tr>
        <th>Summary</th>
        <td>
            Why does llvm optimize structures with the same structure? How to avoid this optimization?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    The source code demo:

```
struct erase_info_user64 einfo64;
```

But the corresponding LLVM IR is as follows:

```
%einfo64 = alloca %struct.exception_table_entry, align 8
```

erase_info_user64 and exception_table_entry have the same structure, but are different variables in the source code:

```
struct erase_info_user64 {
    __u64 start;          
    __u64 length;         
};                        

struct exception_table_entry  
{                             
    unsigned long insn, fixup;
};                            
```

So why does llvm optimize structures with the same structure? How to avoid this optimization? Or is this a bug?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1U01v2zAM_TX2hVhgS_7KwYdlQbEBHQZsw3YMFIuONchSIMlJs18_2nWbtM1yGDBBkEWJ5Ht6pLdWnurvHYK3g2sQGisRJPY24u-jZB0lT2uRzHMyfXBDEwCd8LhRprWbwaMrMsDRKLKIr67GPa6rIUDoRjDn0O-tkcrs4P7-x2f49BWUB-GhtVrbo79NI2L5DAgRX4OgkEYAnT7yW-BDg_ugrNkEsdW4QRPcKWIfyFPtDFQ3OL59mjASriaEThxwepAXPS0T9uBwBNrSU4UjSVXboiN3OAinxlgPyjwGnZX_R9GjclYbaGw2Ax35IFygKsDzeO2h0exCd-kyg5brF3EvxyW9Jz5XNXnO9tdUr1gNxlNNUIK21AzKeDPq16qHYX_uppvcLvhdq-g3C8fuBNKS9FoferDEule_Lyrm4ahCd62U_A4-2iMEC-JglSQXatM5gRgfP3p8cWPzTleCKr-jsxjrtCiSNC14nsWy5nLJlyIOKmisf_5XOvHgdN2FsJ9-InZHc0fphu2isT0ZI-j8ebd39hc2gUzl_YCeNnmZZDzu6rwpsUiXS8Z51cqsYkXKJRe45BVWSSVjLbaofR3lq4gxg0eYUtA-ytexqlnCWFKlSVKyPOeLstrKlKVlmeGylZJFWYK9UHox8lhYt4tdPVEi_TxdauWDP18KP3UJTnCUXwyhs64OLjtwjS6esOuJ-x9lI3e_">