Fix PR2620: Fix X86cmppd selection code so it expects operands to be v2f64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54376 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index da1bd93..57ed8b3 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -4770,8 +4770,9 @@
 
   if (isFP) {
     unsigned SSECC = 8;
-    unsigned Opc = Op0.getValueType() == MVT::v4f32 ? X86ISD::CMPPS :
-                                                      X86ISD::CMPPD;
+    MVT VT0 = Op0.getValueType();
+    assert(VT0 == MVT::v4f32 || VT0 == MVT::v2f64);
+    unsigned Opc = VT0 == MVT::v4f32 ? X86ISD::CMPPS : X86ISD::CMPPD;
     bool Swap = false;
 
     switch (SetCCOpcode) {