[llvm] 4772c66 - [X86] Use explicit ArrayRef<int> template arg to fix clang6 template deduction failure

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 03:13:38 PDT 2023


Author: Simon Pilgrim
Date: 2023-08-18T11:13:27+01:00
New Revision: 4772c66cfb00d60f8f687930e9dd3aa1b6872228

URL: https://github.com/llvm/llvm-project/commit/4772c66cfb00d60f8f687930e9dd3aa1b6872228
DIFF: https://github.com/llvm/llvm-project/commit/4772c66cfb00d60f8f687930e9dd3aa1b6872228.diff

LOG: [X86] Use explicit ArrayRef<int> template arg to fix clang6 template deduction failure

Fixes #64782

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86ISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 7b2d1be1e418e5..7986bc85a73174 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -40300,7 +40300,7 @@ static SDValue combineTargetShuffle(SDValue N, SelectionDAG &DAG,
     // 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;
@@ -40335,8 +40335,8 @@ static SDValue combineTargetShuffle(SDValue N, SelectionDAG &DAG,
         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


        


More information about the llvm-commits mailing list