[llvm] 1a02db9 - [X86] canonicalizeShuffleWithBinOps - add TODO for X86ISD::ANDNP bitwise handling

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 04:18:39 PDT 2022


Author: Simon Pilgrim
Date: 2022-06-09T12:18:26+01:00
New Revision: 1a02db98822ae1a664c687fe84ab86564400aff0

URL: https://github.com/llvm/llvm-project/commit/1a02db98822ae1a664c687fe84ab86564400aff0
DIFF: https://github.com/llvm/llvm-project/commit/1a02db98822ae1a664c687fe84ab86564400aff0.diff

LOG: [X86] canonicalizeShuffleWithBinOps - add TODO for X86ISD::ANDNP bitwise handling

Its just as safe to move shuffles across X86ISD::ANDNP as any other logical bitop, they just tend to appear too late to matter.

Noticed while triaging D127115 regressions.

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 8394a69d609e..89be04674c0b 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -39186,6 +39186,7 @@ static SDValue canonicalizeShuffleWithBinOps(SDValue N, SelectionDAG &DAG,
   auto IsSafeToMoveShuffle = [ShuffleVT](SDValue Op, unsigned BinOp) {
     // Ensure we only shuffle whole vector src elements, unless its a logical
     // binops where we can more aggressively move shuffles from dst to src.
+    // TODO: Add X86ISD::ANDNP handling with test coverage.
     return BinOp == ISD::AND || BinOp == ISD::OR || BinOp == ISD::XOR ||
            (Op.getScalarValueSizeInBits() <= ShuffleVT.getScalarSizeInBits());
   };


        


More information about the llvm-commits mailing list