diff options
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index a7e72e05f7..688c25c6a2 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -4980,11 +4980,9 @@ X86TargetLowering::LowerVectorBroadcast(SDValue &Op, SelectionDAG &DAG) const { return SDValue(); SDValue Sc = Op.getOperand(0); - if (Sc.getOpcode() == ISD::SCALAR_TO_VECTOR) - Ld = Sc.getOperand(0); - else if (Sc.getOpcode() == ISD::BUILD_VECTOR) - Ld = Sc.getOperand(0); - else return SDValue(); + if (Sc.getOpcode() != ISD::SCALAR_TO_VECTOR && + Sc.getOpcode() != ISD::BUILD_VECTOR) + return SDValue(); Ld = Sc.getOperand(0); ConstSplatVal = (Ld.getOpcode() == ISD::Constant || |