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

    <tr>
        <th>Summary</th>
        <td>
            Regression in impact of `-new-struct-path-tbaa` on strict-alias analysis
        </td>
    </tr>

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

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

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

<pre>
    ```cpp
struct Wrapper { int t; };
struct T { Wrapper a, b; };

void g(T& t1, const T& t2 ) {
    t1.a = t2.a;
    t1.b = t2.b;
}
```
Up until clang 17, `-new-struct-path-tbaa` used to be able to deduce that `t1.a` and `t2.b` do not alias.  in clang 18 it no longer does
In this godbolt https://godbolt.org/z/MGG98Gfra it can be seen that clang17 is able to vectorize the two assigments into one, but clang18 isn't.  The diff is also visible in the opt-remarks view.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8U8GOozgQ_RpzKYGgIBAOHDobpbWH1UozPZqzjSvgacdGuEjU_fUjQ9Kt6cNICGzXq1fvUWUZghkcUSd2B7E7JnLh0c_d_2d6_T4a612ivH7rRJ1vTz9NIj-K_CnwvPQMP2c5TTSDaA5gHAOL8gCiOYry8AfuZUU80FLgP6C-Qrf31RsNg8D9i8AauIjQ3rvAsB0gCGwj2wYHAOAikyDKIzBm8oPuHlGPiPos1Bzvi4etbftjgsWxsdBb6QYomlhb1Hnq6JZuRtJJ8piyklLUOSyBNLAHRSCVpbjUpJeegEfJMTVKi0jp9LqNMuoctAfnGaQ1MmQAxj1K7sEwOA_Wu4Fm0J7Cpu1fBzyaAIPXyluGkXkKonwSeBJ4up9mfh4Ent4Fnv57fm73z-dZRsJeuqgxELlN2VqtaMCED-FX6tnP5j1qJ-Cbh3U2LuQ4xNZ68I7Wvi2P_D2Y4AQ2nAG8jATanM8rpQ0eriaYSG3cSugnTme6yPk1wNXQLdtsJbordVu2MqGuaIp9VRe7vEzGru6VrqgtEXUrm6pva9zVJba1Lsu97lViOsyxyutiV1S4y8usVBKrpixUq7DAohVVThdpbGbt9RL_TGJCWKhrd3VdJFYqsmEde0RHN1iDAjHegrmLOalahiCq3JrA4ZOFDVvqvtEwUwjGu-jQXCbZM_jzX8fFOwg8m57TtfEgnbRvwYRkmW33paGGx0Vlvb8IPMXS9086zf4X9SzwtAoOAk-boWuHvwMAAP__rFgqzw">