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

    <tr>
        <th>Summary</th>
        <td>
            __builtin_elementwise_pow breaks with .yyy swizzle from const pointer
        </td>
    </tr>

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

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

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

<pre>
    couldn't really think of a better way to describe the bug. here's the repro code:
```c
typedef float vec3 __attribute__((ext_vector_type(3)));

typedef struct {
    vec3 b;
} struc;

vec3 foo(vec3 a, const struc* hi) { // <- remove const and it'll compile

    vec3 b = __builtin_elementwise_max((vec3)(0.0f), a);
    
 return __builtin_elementwise_pow(b, hi->b.yyy);
}```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx0kl-OszoMxVdjXqxWYMqfPvDQb3p7F3AXgBJwS-4EUiWmHWb1n0LR9GmkSImSc374YKsQzG1ibqD4A8U5UbMMzjf_iWeWp_L8rxo5JNr1S9O52fYTUCXoWVm7oAxm-kR3RYWaRdjjUy0oDnsOnTeaUQZGPd_2OLBnoCqsN57v3mHneob8BOkJyvS1OkhPsty55yterVOCD-5ybFsl4o2ehdsWqAaq-UvaB3fifBsNQHUOdNxW_idC36ggfu4EoYr3iPii6k1XnV-CH9v6enUOqF6PCugDOzcF2YR0wsEAHSMRgS5AF4T8Y4eeR_fgTaumHo0AVdZi58a7sfzivytAyM_Ytno2VszUsuWRJ3mawO2ovl5Jo3LNVaf79LqePmJJW8wIi5tnmf30C-zunkC1js7B7CD_R--XZXn_qur804Kkb_L-mB9Vwk1WHeqsKLMiS4ZGdVlxYE1pVpRlml7zslZ5ken6SN2hr6vENJRSkRZUpGVRFNmeiyOptCbSmSpLquGQ8qiM3Vv7GPfO3xITwsxNdsjyY5VYpdmGdRKJJn7i-gpEcTB9E007Pd8CHFJrgoQ3RoxYbn6Njtqz-gz4NDJgDI7hab6_LePVu3Hr1t2ZSdgns7fNIHIPcTTX1t6MDLPed24EusRvbtvu7t3_3AnQZa00AF22KI-G_gYAAP__QigM8A">