From: Simon Pilgrim Date: Wed, 24 Apr 2019 12:34:08 +0000 (+0000) Subject: [X86] Add shouldFoldConstantShiftPairToMask override placeholder. NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bae5fa7acbd594c38af810c4c9bd054061e2caeb;p=llvm [X86] Add shouldFoldConstantShiftPairToMask override placeholder. NFCI. Prep work toward fixing PR40758 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359088 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 04de45c8ad2..d1e0f690913 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -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(); diff --git a/lib/Target/X86/X86ISelLowering.h b/lib/Target/X86/X86ISelLowering.h index 1742e743f05..ac787f807aa 100644 --- a/lib/Target/X86/X86ISelLowering.h +++ b/lib/Target/X86/X86ISelLowering.h @@ -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