diff options
author | James E Wilson <wilson@specifixinc.com> | 2004-08-17 21:46:40 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2004-08-17 14:46:40 -0700 |
commit | e17c734b1605bf2886d202b6f1d4be31d780a111 (patch) | |
tree | 2933e475ac466941b45611757f28254b3fa3c328 /gcc/config | |
parent | 743a0a34cafa5fe742274f8b36afc3ca948a10f0 (diff) | |
download | gcc-e17c734b1605bf2886d202b6f1d4be31d780a111.zip gcc-e17c734b1605bf2886d202b6f1d4be31d780a111.tar.gz gcc-e17c734b1605bf2886d202b6f1d4be31d780a111.tar.bz2 |
Canonicalize mips nmadd/nmsub patterns.
* config/mips/mips.md: Add canonical nmadd and nmsub patterns for both
normal and -ffast-math code.
From-SVN: r86148
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/mips/mips.md | 56 |
1 files changed, 52 insertions, 4 deletions
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index b9c6f92..8a6440e 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -1904,7 +1904,19 @@ (neg:DF (plus:DF (mult:DF (match_operand:DF 1 "register_operand" "f") (match_operand:DF 2 "register_operand" "f")) (match_operand:DF 3 "register_operand" "f"))))] - "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && TARGET_FUSED_MADD" + "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT + && TARGET_FUSED_MADD && HONOR_SIGNED_ZEROS (DFmode)" + "nmadd.d\t%0,%3,%1,%2" + [(set_attr "type" "fmadd") + (set_attr "mode" "DF")]) + +(define_insn "" + [(set (match_operand:DF 0 "register_operand" "=f") + (minus:DF (mult:DF (neg:DF (match_operand:DF 1 "register_operand" "f")) + (match_operand:DF 2 "register_operand" "f")) + (match_operand:DF 3 "register_operand" "f")))] + "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT + && TARGET_FUSED_MADD && !HONOR_SIGNED_ZEROS (DFmode)" "nmadd.d\t%0,%3,%1,%2" [(set_attr "type" "fmadd") (set_attr "mode" "DF")]) @@ -1914,27 +1926,63 @@ (neg:SF (plus:SF (mult:SF (match_operand:SF 1 "register_operand" "f") (match_operand:SF 2 "register_operand" "f")) (match_operand:SF 3 "register_operand" "f"))))] - "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_FUSED_MADD" + "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_FUSED_MADD + && HONOR_SIGNED_ZEROS (SFmode)" "nmadd.s\t%0,%3,%1,%2" [(set_attr "type" "fmadd") (set_attr "mode" "SF")]) (define_insn "" + [(set (match_operand:SF 0 "register_operand" "=f") + (minus:SF (mult:SF (neg:SF (match_operand:SF 1 "register_operand" "f")) + (match_operand:SF 2 "register_operand" "f")) + (match_operand:SF 3 "register_operand" "f")))] + "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_FUSED_MADD + && !HONOR_SIGNED_ZEROS (SFmode)" + "nmadd.s\t%0,%3,%1,%2" + [(set_attr "type" "fmadd") + (set_attr "mode" "SF")]) + +(define_insn "" + [(set (match_operand:DF 0 "register_operand" "=f") + (neg:DF (minus:DF (mult:DF (match_operand:DF 2 "register_operand" "f") + (match_operand:DF 3 "register_operand" "f")) + (match_operand:DF 1 "register_operand" "f"))))] + "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT + && TARGET_FUSED_MADD && HONOR_SIGNED_ZEROS (DFmode)" + "nmsub.d\t%0,%1,%2,%3" + [(set_attr "type" "fmadd") + (set_attr "mode" "DF")]) + +(define_insn "" [(set (match_operand:DF 0 "register_operand" "=f") (minus:DF (match_operand:DF 1 "register_operand" "f") (mult:DF (match_operand:DF 2 "register_operand" "f") (match_operand:DF 3 "register_operand" "f"))))] - "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && TARGET_FUSED_MADD" + "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT + && TARGET_FUSED_MADD && !HONOR_SIGNED_ZEROS (DFmode)" "nmsub.d\t%0,%1,%2,%3" [(set_attr "type" "fmadd") (set_attr "mode" "DF")]) (define_insn "" [(set (match_operand:SF 0 "register_operand" "=f") + (neg:SF (minus:SF (mult:SF (match_operand:SF 2 "register_operand" "f") + (match_operand:SF 3 "register_operand" "f")) + (match_operand:SF 1 "register_operand" "f"))))] + "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_FUSED_MADD + && HONOR_SIGNED_ZEROS (SFmode)" + "nmsub.s\t%0,%1,%2,%3" + [(set_attr "type" "fmadd") + (set_attr "mode" "SF")]) + +(define_insn "" + [(set (match_operand:SF 0 "register_operand" "=f") (minus:SF (match_operand:SF 1 "register_operand" "f") (mult:SF (match_operand:SF 2 "register_operand" "f") (match_operand:SF 3 "register_operand" "f"))))] - "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_FUSED_MADD" + "ISA_HAS_NMADD_NMSUB && TARGET_HARD_FLOAT && TARGET_FUSED_MADD + && !HONOR_SIGNED_ZEROS (SFmode)" "nmsub.s\t%0,%1,%2,%3" [(set_attr "type" "fmadd") (set_attr "mode" "SF")]) |