X86: Don't form min/max nodes if the target is missing SSE.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 22 Sep 2011 03:01:42 +0000 (03:01 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 22 Sep 2011 03:01:42 +0000 (03:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140294 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 36e254b1f58120380c4b334791868df0405620ef..996dd12d3e41b552850c4253dc35397e4803b8ec 100644 (file)
@@ -12568,7 +12568,8 @@ static SDValue PerformSELECTCombine(SDNode *N, SelectionDAG &DAG,
   // instructions match the semantics of the common C idiom x<y?x:y but not
   // x<=y?x:y, because of how they handle negative zero (which can be
   // ignored in unsafe-math mode).
-  if (Cond.getOpcode() == ISD::SETCC && VT.isFloatingPoint() &&
+  if (Subtarget->hasXMM() &&
+      Cond.getOpcode() == ISD::SETCC && VT.isFloatingPoint() &&
       VT != MVT::f80 && DAG.getTargetLoweringInfo().isTypeLegal(VT)) {
     ISD::CondCode CC = cast<CondCodeSDNode>(Cond.getOperand(2))->get();