diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 40e3070ae94d..2812b088b61a 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -5788,7 +5788,7 @@ static SDValue getShuffleVectorZeroOrUndef(SDValue V2, int Idx, } static const Constant *getTargetConstantFromNode(LoadSDNode *Load) { - if (!Load) + if (!Load || !ISD::isNormalLoad(Load)) return nullptr; SDValue Ptr = Load->getBasePtr();