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

    <tr>
        <th>Summary</th>
        <td>
            Compiler seems to get into an infinite loop while building after e158add
        </td>
    </tr>

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

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

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

<pre>
    We have several internal tests that usually take only a few seconds to compile, but after e158add, the tests are now taking minutes to compile before the automation kills the compilation. I manually tried to compile one of the tests, and before the above change, the compile only took a few seconds, but after, it was running for 8 minutes without ending before I killed it.

I was able to reproduce one of the tests down to the following code:
```c++
typedef signed char schar;
typedef char __attribute__((ext_vector_type(8))) char8;
typedef schar __attribute__((ext_vector_type(8))) schar8;
typedef union { char8 a; schar8 b; } union_char8_schar8;
typedef union { schar8 a; char8 b; } union_schar8_char8;
#define union_char8_schar8_a(__A) ((__A.a))
#define char8_bxor(__A, __B) ((char8)(__A ^ __B))
#define union_schar8_char8_a(__A) ((__A.a))
#define convertvector_schar8_char8(__A) (__builtin_convertvector(__A, char8))
#define char8_neq(__A, __B) ((char8)(__A != __B))

char8 test48()
{
      char8 id10189 = (char8){(char)1018307070, (char)2147483647, (char)982280499, (char)-241742324, (char)-2103038824, (char)1483383219, (char)-2147483647, (char)-26378412}; // vec_type
 union_char8_schar8 id10191;
        id10191.a = (char8){(char)2147483647, (char)1478343380, (char)-1460710262, (char)-493315656, (char)-1241235597, (char)1533947050, (char)-210503871, (char)-110138540}; // vec_type
 volatile char8 id10190 = union_char8_schar8_a(id10191);
    char8 id10188 = char8_bxor(id10189, id10190);
        union_schar8_char8 id10194;
 id10194.b = (char8){(char)-1721966071, (char)1207924559, (char)-1065372584, (char)-331857933, (char)592155444, (char)-547728733, (char)1148365877, (char)1439159937}; // vec_type
      schar8 id10193 = union_schar8_char8_a(id10194);
    char8 id10192 = convertvector_schar8_char8(id10193);
  char8 id10187 = char8_neq(id10188, id10192);
  return id10187;
}
```
If compiled with optimizations enabled `-O2` the compiler seems to get stuck in an infinite loop.

@dtcxzyw this seems to have been caused by a change you made. Can you take a look and revert if you need time to investigate?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVktzozgQ_jXypSsuPQBJBx8myaZqTnvcIyWgsbXBUhaEPZlfvyWBxwYn2QdFYdPq_vop9JlhsHuHuCP5I8mfN2YMB9_vmvfR7TeVb953fyAczAlhwBP2pgPrAvbOdBBwCAOEgwkwDqPpuncI5hXBu-4dDLR4hgFr75oBgofaH99sh4Q_QTUGMG3AHpDlyjRNFIYDzoimR3D-HMGs28PRujHgLQZU2Poek4kZgz-aYL2DV9t1QxJOekm6he9wNG4Or7fY3AJ5h-Dbq-8YiHHNwkHlTwj1wbg9XuK8mkdQ71-X6S5yjC82wNkM0I_OxYxa34P6ldfZhoMfA6Br4uLs-ntKBxuwYUvoM6Hfpuf3hGSqDmMePb71vhnr-0yg8WcXVaKk9V3nzxG99g0SMWORgk53TfhjvJM0vL9hgy2kuWhi5j0M8UnESiMtlaUJobfVGLAsCVeEK_wRyhPWwfdlVCVcKcL1dCcjdQc1_C-s4WOw0cVxIPJxcgaGiMdZF6r4n8jnSalMwvIfcYYboA9xJoVyiUO4aLC1Dj9wVhrCVVl-i2lMmZblt62Zc1uZTxbVD99fjJ6gLB-vtpPfaBuXgeS_zesfgN0H_N9i8e6EfZh7ssj7FqQsq9F2wbpyYXCN_xryJ-k6_OtfZssZEc93Cafn1Ky4IzKVjC-rcu4RpGtSsw2jTGmIaLdu5OP8RriOGoJKKmkM6yrnLJOZEkUml3KtOFc003opfuAZkxkXPFvLGRVUKLVeYJkSQgnO7oA-cfzACyFVxjiRz2lW-QvhL3DCetpIU_b3gzlVQbNfUwzzNcu35sv6fBYOy6QSmRBqVbcHlhVUMsoLvlrItBAsL_JibcAzxkWe67WHXAidSZqvPXBGcyqUZG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