diff options
author | Claudiu Zissulescu <claziss@synopsys.com> | 2018-06-13 10:54:09 +0200 |
---|---|---|
committer | Claudiu Zissulescu <claziss@gcc.gnu.org> | 2018-06-13 10:54:09 +0200 |
commit | 8c191c89cfde7c74955c21d488702077cca89117 (patch) | |
tree | ac431bc7cbacdc4a4453a803a387a451f3a478c9 /gcc/config/arc/fpu.md | |
parent | 16493b5771cf3b1670a4a9bf7c7426fd74b727d0 (diff) | |
download | gcc-8c191c89cfde7c74955c21d488702077cca89117.zip gcc-8c191c89cfde7c74955c21d488702077cca89117.tar.gz gcc-8c191c89cfde7c74955c21d488702077cca89117.tar.bz2 |
[ARC] Update fma expansions.
Accept at most a single constant for fma patterns.
gcc/
2018-03-21 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/fpu.md (fmasf4): Force operand to register.
(fnmasf4): Likewise.
gcc/testsuite
2018-03-21 Claudiu Zissulescu <claziss@synopsys.com>
* gcc.target/arc/fma-1.c: New test.
From-SVN: r261543
Diffstat (limited to 'gcc/config/arc/fpu.md')
-rw-r--r-- | gcc/config/arc/fpu.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/arc/fpu.md b/gcc/config/arc/fpu.md index 5c56f76..66a4d91 100644 --- a/gcc/config/arc/fpu.md +++ b/gcc/config/arc/fpu.md @@ -64,6 +64,9 @@ tmp = gen_rtx_REG (SFmode, ACCL_REGNO); emit_move_insn (tmp, operands[3]); operands[3] = tmp; + if (!register_operand (operands[1], SFmode) + && !register_operand (operands[2], SFmode)) + operands[2] = force_reg (SFmode, operands[2]); }") (define_expand "fnmasf4" @@ -77,6 +80,9 @@ tmp = gen_rtx_REG (SFmode, ACCL_REGNO); emit_move_insn (tmp, operands[3]); operands[3] = tmp; + if (!register_operand (operands[1], SFmode) + && !register_operand (operands[2], SFmode)) + operands[2] = force_reg (SFmode, operands[2]); }") (define_insn "fmasf4_fpu" |