Skip to content

Commit 1c62549

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 776a74b commit 1c62549

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
@@ -43047,7 +43047,7 @@ static SDValue combineTargetShuffle(SDValue N, SelectionDAG &DAG,
4304743047
// See if this reduces to a PSHUFD which is no more expensive and can
4304843048
// combine with more operations. Note that it has to at least flip the
4304943049
// dwords as otherwise it would have been removed as a no-op.
43050-
if (ArrayRef(Mask).equals({2, 3, 0, 1})) {
43050+
if (ArrayRef<int>(Mask).equals({2, 3, 0, 1})) {
4305143051
int DMask[] = {0, 1, 2, 3};
4305243052
int DOffset = N.getOpcode() == X86ISD::PSHUFLW ? 0 : 2;
4305343053
DMask[DOffset + 0] = DOffset + 1;
@@ -43082,8 +43082,8 @@ static SDValue combineTargetShuffle(SDValue N, SelectionDAG &DAG,
4308243082
int MappedMask[8];
4308343083
for (int i = 0; i < 8; ++i)
4308443084
MappedMask[i] = 2 * DMask[WordMask[i] / 2] + WordMask[i] % 2;
43085-
if (ArrayRef(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
43086-
ArrayRef(MappedMask).equals({4, 4, 5, 5, 6, 6, 7, 7})) {
43085+
if (ArrayRef<int>(MappedMask).equals({0, 0, 1, 1, 2, 2, 3, 3}) ||
43086+
ArrayRef<int>(MappedMask).equals({4, 4, 5, 5, 6, 6, 7, 7})) {
4308743087
// We can replace all three shuffles with an unpack.
4308843088
V = DAG.getBitcast(VT, D.getOperand(0));
4308943089
return DAG.getNode(MappedMask[0] == 0 ? X86ISD::UNPCKL

0 commit comments

Comments
 (0)