This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [SH][committed] Fix PR 64652
- From: Oleg Endo <oleg dot endo at t-online dot de>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 20 Jan 2015 00:29:13 +0100
- Subject: Re: [SH][committed] Fix PR 64652
- Authentication-results: sourceware.org; auth=none
- References: <1421604887 dot 2376 dot 21 dot camel at yam-132-YW-E178-FTW>
On Sun, 2015-01-18 at 19:14 +0100, Oleg Endo wrote:
> Hi,
>
> The attached patch fixes PR 64652. Tested with
> make -k check-gcc RUNTESTFLAGS="sh-torture.exp --target_board=sh-sim
> \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}"
> Committed as r219824.
>
> Cheers,
> Oleg
>
> gcc/ChangeLog:
> PR target/64652
> * config/sh/sh.md (udivsi3_i4, divsi3_i4): Make use of sfunc address
> reg appear first in the parallel.
>
> gcc/testsuite/ChangeLog:
> PR target/64652
> * gcc.target/sh/torture/pr64652.c: New.
I forgot to add the unsigned div test case that checks the udivsi3_i4
insn. Committed as r219870.
Cheers,
Oleg
gcc/testsuite/ChangeLog:
PR target/64652
* gcc.target/sh/torture/pr64652.c (test): Rename to test_0.
(test_1): New.
Index: gcc/testsuite/gcc.target/sh/torture/pr64652.c
===================================================================
--- gcc/testsuite/gcc.target/sh/torture/pr64652.c (revision 219869)
+++ gcc/testsuite/gcc.target/sh/torture/pr64652.c (working copy)
@@ -4,7 +4,13 @@
/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
int
-test (int a, int b, int c, int d)
+test_0 (int a, int b, int c, int d)
{
return (a / b) + c + d;
}
+
+unsigned int
+test_1 (unsigned int a, unsigned int b, unsigned int c, unsigned int d)
+{
+ return (a / b) + c + d;
+}