[llvm-commits] [llvm] r86895 - /llvm/trunk/lib/Target/Mips/MipsInstrFPU.td

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Wed Nov 11 15:09:33 PST 2009


Author: bruno
Date: Wed Nov 11 17:09:33 2009
New Revision: 86895

URL: http://llvm.org/viewvc/llvm-project?rev=86895&view=rev
Log:
A real solution for the first part of PR5445

Modified:
    llvm/trunk/lib/Target/Mips/MipsInstrFPU.td

Modified: llvm/trunk/lib/Target/Mips/MipsInstrFPU.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrFPU.td?rev=86895&r1=86894&r2=86895&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsInstrFPU.td (original)
+++ llvm/trunk/lib/Target/Mips/MipsInstrFPU.td Wed Nov 11 17:09:33 2009
@@ -281,10 +281,15 @@
 // Floating Point Patterns
 //===----------------------------------------------------------------------===//
 def fpimm0 : PatLeaf<(fpimm), [{
-  return N->isExactlyValue(+0.0) || N->isExactlyValue(-0.0);
+  return N->isExactlyValue(+0.0);
+}]>;
+
+def fpimm0neg : PatLeaf<(fpimm), [{
+  return N->isExactlyValue(-0.0);
 }]>;
 
 def : Pat<(f32 fpimm0), (MTC1 ZERO)>;
+def : Pat<(f32 fpimm0neg), (FNEG_S32 (MTC1 ZERO))>;
 
 def : Pat<(f32 (sint_to_fp CPURegs:$src)), (CVTS_W32 (MTC1 CPURegs:$src))>;
 def : Pat<(f64 (sint_to_fp CPURegs:$src)), (CVTD_W32 (MTC1 CPURegs:$src))>;





More information about the llvm-commits mailing list