Skip to content

Commit c3c80ad

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 fb73289 commit c3c80ad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41557,7 +41557,7 @@ static SDValue combineTargetShuffle(SDValue N, SelectionDAG &DAG,
4155741557
// See if this reduces to a PSHUFD which is no more expensive and can
4155841558
// combine with more operations. Note that it has to at least flip the
4155941559
// dwords as otherwise it would have been removed as a no-op.
41560-
if (ArrayRef(Mask).equals({2, 3, 0, 1})) {
41560+
if (ArrayRef<int>(Mask).equals({2, 3, 0, 1})) {
4156141561
int DMask[] = {0, 1, 2, 3};
4156241562
int DOffset = N.getOpcode() == X86ISD::PSHUFLW ? 0 : 2;
4156341563
DMask[DOffset + 0] = DOffset + 1;
@@ -41592,8 +41592,8 @@ static SDValue combineTargetShuffle(SDValue N, SelectionDAG &DAG,
4159241592
int MappedMask[8];
4159341593
for (int i = 0; i < 8; ++i)
4159441594
MappedMask[i] = 2 * DMask[WordMask[i] / 2] + WordMask[i] % 2;
41595-
if (ArrayRef(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
41596-
ArrayRef(MappedMask).equals({4, 4, 5, 5, 6, 6, 7, 7})) {
41595+
if (ArrayRef<int>(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
41596+
ArrayRef<int>(MappedMask).equals({4, 4, 5, 5, 6, 6, 7, 7})) {
4159741597
// We can replace all three shuffles with an unpack.
4159841598
V = DAG.getBitcast(VT, D.getOperand(0));
4159941599
return DAG.getNode(MappedMask[0] == 0 ? X86ISD::UNPCKL

0 commit comments

Comments
 (0)