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

    <tr>
        <th>Summary</th>
        <td>
            X86ISelLowering.cpp in LLVM-17 doesn't compile with clang 6 on Ubuntu 18.04
        </td>
    </tr>

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

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

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

<pre>
    According to the docs, the base toolchain needed to build LLVM requires [Clang 5.0 or higher](https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library). Ubuntu 18.04 comes with clang 6, but LLVM does not build with clang 6 due to the move to template deduction guides.

The change in 38818b60c58c7, removing `makeArrayRef` and replacing it with the deduction guides, appears to have introduced the build failure. I am hitting the following build failure when building the LLVM 17 release with the X86 backend enabled on Ubuntu 18.04:
```
/home/ewilde/work/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:43050:17: error: cannot use parentheses when declaring variable with deduced class template specialization type
    if (ArrayRef(Mask).equals({2, 3, 0, 1})) {
 ^
/home/ewilde/work/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:43050:18: error: variable declaration in condition must have an initializer
    if (ArrayRef(Mask).equals({2, 3, 0, 1})) {
 ^
/home/ewilde/work/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:43085:21: error: cannot use parentheses when declaring variable with deduced class template specialization type
        if (ArrayRef(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
 ^
/home/ewilde/work/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:43085:22: error: variable declaration in condition must have an initializer
 if (ArrayRef(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
 ^
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUlU2P2zYQhn8NfRlYoCjr66CDd7cu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