[llvm] r359088 - [X86] Add shouldFoldConstantShiftPairToMask override placeholder. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 05:34:09 PDT 2019


Author: rksimon
Date: Wed Apr 24 05:34:08 2019
New Revision: 359088

URL: http://llvm.org/viewvc/llvm-project?rev=359088&view=rev
Log:
[X86] Add shouldFoldConstantShiftPairToMask override placeholder. NFCI.

Prep work toward fixing PR40758

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

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=359088&r1=359087&r2=359088&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Apr 24 05:34:08 2019
@@ -5011,6 +5011,12 @@ bool X86TargetLowering::hasAndNot(SDValu
   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();
 

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=359088&r1=359087&r2=359088&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Wed Apr 24 05:34:08 2019
@@ -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




More information about the llvm-commits mailing list