[llvm] r340844 - [X86] Mark the FUCOMI instructions as requiring CMOV to be enabled. NFCI

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 28 10:17:13 PDT 2018


Author: ctopper
Date: Tue Aug 28 10:17:13 2018
New Revision: 340844

URL: http://llvm.org/viewvc/llvm-project?rev=340844&view=rev
Log:
[X86] Mark the FUCOMI instructions as requiring CMOV to be enabled. NFCI

These instructions were added on the PentiumPro along with CMOV.

This was already comprehended by the lowering process which should emit an alternate sequence using FCOM and FNSTW. This just makes it an explicit error if that doesn't work for some reason.

Modified:
    llvm/trunk/lib/Target/X86/X86InstrFPStack.td

Modified: llvm/trunk/lib/Target/X86/X86InstrFPStack.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFPStack.td?rev=340844&r1=340843&r2=340844&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrFPStack.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrFPStack.td Tue Aug 28 10:17:13 2018
@@ -592,10 +592,13 @@ def UCOM_Fpr80 : FpI_  <(outs), (ins RFP
 let SchedRW = [WriteFCom] in {
 // CC = ST(0) cmp ST(i)
 let Defs = [EFLAGS, FPSW] in {
+let Predicates = [FPStackf32, HasCMov] in
 def UCOM_FpIr32: FpIf32<(outs), (ins RFP32:$lhs, RFP32:$rhs), CompareFP,
                   [(set EFLAGS, (X86cmp RFP32:$lhs, RFP32:$rhs))]>;
+let Predicates = [FPStackf64, HasCMov] in
 def UCOM_FpIr64: FpIf64<(outs), (ins RFP64:$lhs, RFP64:$rhs), CompareFP,
                   [(set EFLAGS, (X86cmp RFP64:$lhs, RFP64:$rhs))]>;
+let Predicates = [HasCMov] in
 def UCOM_FpIr80: FpI_<(outs), (ins RFP80:$lhs, RFP80:$rhs), CompareFP,
                   [(set EFLAGS, (X86cmp RFP80:$lhs, RFP80:$rhs))]>;
 }




More information about the llvm-commits mailing list