diff options
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index c407efb543b..ccb8e8aa76b 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -39599,7 +39599,8 @@ static SDValue combineOrShiftToFunnelShift(SDNode *N, SelectionDAG &DAG, EVT VT = N->getValueType(0); const TargetLowering &TLI = DAG.getTargetLoweringInfo(); - if (VT != MVT::i16 && VT != MVT::i32 && VT != MVT::i64) + if (!TLI.isOperationLegalOrCustom(ISD::FSHL, VT) || + !TLI.isOperationLegalOrCustom(ISD::FSHR, VT)) return SDValue(); // fold (or (x << c) | (y >> (64 - c))) ==> (shld64 x, y, c) |

