The FP stack doesn't support UNDEF, ask the legalizer to legalize it
authorChris Lattner <sabre@nondot.org>
Sun, 29 Jan 2006 06:44:22 +0000 (06:44 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 29 Jan 2006 06:44:22 +0000 (06:44 +0000)
instead of lying and saying we have it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25775 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrInfo.td

index 8a8161925b971be5dd81a7f6343c6a3a440e6723..9503bc13c48c87407fa95a4ce56ed2c607897022 100644 (file)
@@ -221,7 +221,9 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM)
   } else {
     // Set up the FP register classes.
     addRegisterClass(MVT::f64, X86::RFPRegisterClass);
-
+    
+    setOperationAction(ISD::UNDEF, MVT::f64, Expand);
+    
     if (!X86PatIsel) {
       setOperationAction(ISD::SINT_TO_FP, MVT::i16, Custom);
       setOperationAction(ISD::SINT_TO_FP, MVT::i32, Custom);
index 8362a7e6613e36b552579262e07278c62d97783c..b3941b4fc5753e411934f4b7baf0542bac51eeb7 100644 (file)
@@ -3022,10 +3022,6 @@ def : Pat<(X86fst RFP:$src, addr:$op, f64), (FpST64m addr:$op, RFP:$src)>;
 def : Pat<(f64 fp64immneg0), (FpCHS (FpLD0))>, Requires<[FPStack]>;
 def : Pat<(f64 fp64immneg1), (FpCHS (FpLD1))>, Requires<[FPStack]>;
 
-// RFP undef
-def : Pat<(f64 (undef)), (FpLD0)>,  Requires<[FPStack]>;
-
-
 //===----------------------------------------------------------------------===//
 // Some peepholes
 //===----------------------------------------------------------------------===//