Skip to content

Commit 585a6eb

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 29ce31a commit 585a6eb

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
@@ -41542,7 +41542,7 @@ static SDValue combineTargetShuffle(SDValue N, SelectionDAG &DAG,
4154241542
// See if this reduces to a PSHUFD which is no more expensive and can
4154341543
// combine with more operations. Note that it has to at least flip the
4154441544
// dwords as otherwise it would have been removed as a no-op.
41545-
if (ArrayRef(Mask).equals({2, 3, 0, 1})) {
41545+
if (ArrayRef<int>(Mask).equals({2, 3, 0, 1})) {
4154641546
int DMask[] = {0, 1, 2, 3};
4154741547
int DOffset = N.getOpcode() == X86ISD::PSHUFLW ? 0 : 2;
4154841548
DMask[DOffset + 0] = DOffset + 1;
@@ -41577,8 +41577,8 @@ static SDValue combineTargetShuffle(SDValue N, SelectionDAG &DAG,
4157741577
int MappedMask[8];
4157841578
for (int i = 0; i < 8; ++i)
4157941579
MappedMask[i] = 2 * DMask[WordMask[i] / 2] + WordMask[i] % 2;
41580-
if (ArrayRef(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
41581-
ArrayRef(MappedMask).equals({4, 4, 5, 5, 6, 6, 7, 7})) {
41580+
if (ArrayRef<int>(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
41581+
ArrayRef<int>(MappedMask).equals({4, 4, 5, 5, 6, 6, 7, 7})) {
4158241582
// We can replace all three shuffles with an unpack.
4158341583
V = DAG.getBitcast(VT, D.getOperand(0));
4158441584
return DAG.getNode(MappedMask[0] == 0 ? X86ISD::UNPCKL

0 commit comments

Comments
 (0)