diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-05 22:08:54 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-05 22:08:54 +0000 |
commit | b00035f2b4289c0268eb1e1b3076cda420a8e0a1 (patch) | |
tree | 343fff3d65797aee1c79edb6d6a8a4cac67839bd | |
parent | 7eb0c9475b0d4c3917a2552c315e414901363b7d (diff) | |
download | gcc-b00035f2b4289c0268eb1e1b3076cda420a8e0a1.tar.gz |
PR target/6561
* config/sparc/sparc.md (muldi3_v8plus): Handle %1 equal to %2.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53197 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.md | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8dfaae729a1..a56fd7e4f22 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-05-05 Jakub Jelinek <jakub@redhat.com> + + PR target/6561 + * config/sparc/sparc.md (muldi3_v8plus): Handle %1 equal to %2. + 2002-05-05 Richard Henderson <rth@redhat.com> * config/alpha/alpha.c (alpha_adjust_cost): Remove everything but diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index 8f19dc7fd1d..cb0c6654303 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -5489,6 +5489,13 @@ else return \"sllx\\t%H1, 32, %3\\n\\tor\\t%L1, %3, %3\\n\\tmulx\\t%3, %2, %3\\n\\tsrlx\\t%3, 32, %H0\\n\\tmov\\t%3, %L0\"; } + else if (rtx_equal_p (operands[1], operands[2])) + { + if (which_alternative == 1) + return \"or\\t%L1, %H1, %H1\\n\\tmulx\\t%H1, %H1, %L0\;srlx\\t%L0, 32, %H0\"; + else + return \"sllx\\t%H1, 32, %3\\n\\tor\\t%L1, %3, %3\\n\\tmulx\\t%3, %3, %3\\n\\tsrlx\\t%3, 32, %H0\\n\\tmov\\t%3, %L0\"; + } if (sparc_check_64 (operands[2], insn) <= 0) output_asm_insn (\"srl\\t%L2, 0, %L2\", operands); if (which_alternative == 1) |