Skip to content

Commit 17a687b

Browse files
committed
[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}) || ^
1 parent ad24251 commit 17a687b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: llvm/lib/Target/X86/X86ISelLowering.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -43073,7 +43073,7 @@ static SDValue combineTargetShuffle(SDValue N, SelectionDAG &DAG,
4307343073
// See if this reduces to a PSHUFD which is no more expensive and can
4307443074
// combine with more operations. Note that it has to at least flip the
4307543075
// dwords as otherwise it would have been removed as a no-op.
43076-
if (ArrayRef(Mask).equals({2, 3, 0, 1})) {
43076+
if (ArrayRef<int>(Mask).equals({2, 3, 0, 1})) {
4307743077
int DMask[] = {0, 1, 2, 3};
4307843078
int DOffset = N.getOpcode() == X86ISD::PSHUFLW ? 0 : 2;
4307943079
DMask[DOffset + 0] = DOffset + 1;
@@ -43108,8 +43108,8 @@ static SDValue combineTargetShuffle(SDValue N, SelectionDAG &DAG,
4310843108
int MappedMask[8];
4310943109
for (int i = 0; i < 8; ++i)
4311043110
MappedMask[i] = 2 * DMask[WordMask[i] / 2] + WordMask[i] % 2;
43111-
if (ArrayRef(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
43112-
ArrayRef(MappedMask).equals({4, 4, 5, 5, 6, 6, 7, 7})) {
43111+
if (ArrayRef<int>(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
43112+
ArrayRef<int>(MappedMask).equals({4, 4, 5, 5, 6, 6, 7, 7})) {
4311343113
// We can replace all three shuffles with an unpack.
4311443114
V = DAG.getBitcast(VT, D.getOperand(0));
4311543115
return DAG.getNode(MappedMask[0] == 0 ? X86ISD::UNPCKL

0 commit comments

Comments
 (0)