]> granicus.if.org Git - llvm/commitdiff
[X86] Add shouldFoldConstantShiftPairToMask override placeholder. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 24 Apr 2019 12:34:08 +0000 (12:34 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 24 Apr 2019 12:34:08 +0000 (12:34 +0000)
Prep work toward fixing PR40758

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359088 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h

index 04de45c8ad211702d335e2663bdb610e2bacf13f..d1e0f690913f9e2e6d1093c98304faadb0e195d1 100644 (file)
@@ -5011,6 +5011,12 @@ bool X86TargetLowering::hasAndNot(SDValue Y) const {
   return Subtarget.hasSSE2();
 }
 
+bool X86TargetLowering::shouldFoldConstantShiftPairToMask(
+    const SDNode *N, CombineLevel Level) const {
+  // TODO - some targets prefer immediate vector shifts to shift+mask.
+  return TargetLoweringBase::shouldFoldConstantShiftPairToMask(N, Level);
+}
+
 bool X86TargetLowering::shouldFoldMaskToVariableShiftPair(SDValue Y) const {
   EVT VT = Y.getValueType();
 
index 1742e743f0530a314baf1b402d787f68ec4626ca..ac787f807aa763a61d43f11393dd033d6ab257bc 100644 (file)
@@ -814,6 +814,9 @@ namespace llvm {
 
     bool hasAndNot(SDValue Y) const override;
 
+    bool shouldFoldConstantShiftPairToMask(const SDNode *N,
+                                           CombineLevel Level) const override;
+
     bool shouldFoldMaskToVariableShiftPair(SDValue Y) const override;
 
     bool