Noticed by inspection when looking for other cmov bits.
authorEric Christopher <echristo@apple.com>
Wed, 29 Sep 2010 23:00:29 +0000 (23:00 +0000)
committerEric Christopher <echristo@apple.com>
Wed, 29 Sep 2010 23:00:29 +0000 (23:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115100 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86FastISel.cpp

index 50dd2c5d3f1873c6f9d51de9f4a4053adb1a3a12..e7813716e47fd1258208fa60faf80689e61b943b 100644 (file)
@@ -1194,6 +1194,9 @@ bool X86FastISel::X86SelectSelect(const Instruction *I) {
   if (VT == MVT::Other || !isTypeLegal(I->getType(), VT))
     return false;
   
+  // We only use cmov here, if we don't have a cmov instruction bail.
+  if (!Subtarget->hasCMov()) return false;
+  
   unsigned Opc = 0;
   const TargetRegisterClass *RC = NULL;
   if (VT.getSimpleVT() == MVT::i16) {