[rust] Fix FreeBSD 12 build
Clang 6 appears to be unable to handle CTAD in this position:
/checkout/src/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:41545:17: error: cannot use parentheses when declaring variable with deduced class template specialization type
if (ArrayRef(Mask).equals({2, 3, 0, 1})) {
^
/checkout/src/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:41545:18: error: variable declaration in condition must have an initializer
if (ArrayRef(Mask).equals({2, 3, 0, 1})) {
^
/checkout/src/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:41580: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}) ||
^
/checkout/src/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp:41580:22: error: variable declaration in condition must have an initializer
if (ArrayRef(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
^
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index cf17c51..93a578e 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -41542,7 +41542,7 @@
// See if this reduces to a PSHUFD which is no more expensive and can
// combine with more operations. Note that it has to at least flip the
// dwords as otherwise it would have been removed as a no-op.
- if (ArrayRef(Mask).equals({2, 3, 0, 1})) {
+ if (ArrayRef<int>(Mask).equals({2, 3, 0, 1})) {
int DMask[] = {0, 1, 2, 3};
int DOffset = N.getOpcode() == X86ISD::PSHUFLW ? 0 : 2;
DMask[DOffset + 0] = DOffset + 1;
@@ -41577,8 +41577,8 @@
int MappedMask[8];
for (int i = 0; i < 8; ++i)
MappedMask[i] = 2 * DMask[WordMask[i] / 2] + WordMask[i] % 2;
- if (ArrayRef(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
- ArrayRef(MappedMask).equals({4, 4, 5, 5, 6, 6, 7, 7})) {
+ if (ArrayRef<int>(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
+ ArrayRef<int>(MappedMask).equals({4, 4, 5, 5, 6, 6, 7, 7})) {
// We can replace all three shuffles with an unpack.
V = DAG.getBitcast(VT, D.getOperand(0));
return DAG.getNode(MappedMask[0] == 0 ? X86ISD::UNPCKL