From: Eric Christopher Date: Wed, 29 Sep 2010 23:00:29 +0000 (+0000) Subject: Noticed by inspection when looking for other cmov bits. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e487b017e94393ec4e90e8bb02818cab39190787;p=oota-llvm.git Noticed by inspection when looking for other cmov bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115100 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp index 50dd2c5d3f1..e7813716e47 100644 --- a/lib/Target/X86/X86FastISel.cpp +++ b/lib/Target/X86/X86FastISel.cpp @@ -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) {