aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-11-11 23:09:33 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-11-11 23:09:33 +0000
commit9089ba8e5e76ab507d5f45c3791babb5bbc26f67 (patch)
tree5c50e9c4e8bba28f9b062fec6e9d4fbb021cb674 /lib
parent1697652922452529e2f20730398d09a69a60e530 (diff)
downloadexternal_llvm-9089ba8e5e76ab507d5f45c3791babb5bbc26f67.zip
external_llvm-9089ba8e5e76ab507d5f45c3791babb5bbc26f67.tar.gz
external_llvm-9089ba8e5e76ab507d5f45c3791babb5bbc26f67.tar.bz2
A real solution for the first part of PR5445
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86895 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/Mips/MipsInstrFPU.td7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsInstrFPU.td b/lib/Target/Mips/MipsInstrFPU.td
index 8fa1c65..b7d02bc 100644
--- a/lib/Target/Mips/MipsInstrFPU.td
+++ b/lib/Target/Mips/MipsInstrFPU.td
@@ -281,10 +281,15 @@ def MOVCCRToCCR : MipsPseudo<(outs CCR:$dst), (ins CCR:$src),
// 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))>;