* RFA: Allow widening multiplication in tree-ssa/slsr-8.c
@ 2013-01-13 8:50 Richard Sandiford
2013-01-14 14:44 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Richard Sandiford @ 2013-01-13 8:50 UTC (permalink / raw)
To: gcc-patches
gcc.dg/tree-ssa/slsr-8.c does "(int) index * (size_t) element_size",
which on LP64 targets can use a widening multiplication. Of course,
for simple element sizes like these, we end up using a shift instead,
but that's a decision that's rightly made later.
Tested on x86_64-linux-gnu, mips64-linux-gnu and mipsisa64-elf.
OK to install?
Richard
gcc/testsuite/
* gcc.dg/tree-ssa/slsr-8.c: Allow widening multiplications.
Index: gcc/testsuite/gcc.dg/tree-ssa/slsr-8.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/slsr-8.c 2013-01-13 08:05:03.403375571 +0000
+++ gcc/testsuite/gcc.dg/tree-ssa/slsr-8.c 2013-01-13 08:46:05.246550444 +0000
@@ -18,6 +18,7 @@ f (int s, int *c)
}
/* There are 4 ' * ' instances in the decls (since "int * iftmp.0;" is
- added), 1 parm, 2 in the code. */
-/* { dg-final { scan-tree-dump-times " \\* " 7 "optimized" } } */
+ added), 1 parm, 2 in the code. The second one in the code can be
+ a widening mult. */
+/* { dg-final { scan-tree-dump-times " w?\\* " 7 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RFA: Allow widening multiplication in tree-ssa/slsr-8.c
2013-01-13 8:50 RFA: Allow widening multiplication in tree-ssa/slsr-8.c Richard Sandiford
@ 2013-01-14 14:44 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2013-01-14 14:44 UTC (permalink / raw)
To: gcc-patches, rdsandiford
On Sun, Jan 13, 2013 at 9:50 AM, Richard Sandiford
<rdsandiford@googlemail.com> wrote:
> gcc.dg/tree-ssa/slsr-8.c does "(int) index * (size_t) element_size",
> which on LP64 targets can use a widening multiplication. Of course,
> for simple element sizes like these, we end up using a shift instead,
> but that's a decision that's rightly made later.
>
> Tested on x86_64-linux-gnu, mips64-linux-gnu and mipsisa64-elf.
> OK to install?
Ok.
Thanks,
Richard.
> Richard
>
>
> gcc/testsuite/
> * gcc.dg/tree-ssa/slsr-8.c: Allow widening multiplications.
>
> Index: gcc/testsuite/gcc.dg/tree-ssa/slsr-8.c
> ===================================================================
> --- gcc/testsuite/gcc.dg/tree-ssa/slsr-8.c 2013-01-13 08:05:03.403375571 +0000
> +++ gcc/testsuite/gcc.dg/tree-ssa/slsr-8.c 2013-01-13 08:46:05.246550444 +0000
> @@ -18,6 +18,7 @@ f (int s, int *c)
> }
>
> /* There are 4 ' * ' instances in the decls (since "int * iftmp.0;" is
> - added), 1 parm, 2 in the code. */
> -/* { dg-final { scan-tree-dump-times " \\* " 7 "optimized" } } */
> + added), 1 parm, 2 in the code. The second one in the code can be
> + a widening mult. */
> +/* { dg-final { scan-tree-dump-times " w?\\* " 7 "optimized" } } */
> /* { dg-final { cleanup-tree-dump "optimized" } } */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-14 14:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-13 8:50 RFA: Allow widening multiplication in tree-ssa/slsr-8.c Richard Sandiford
2013-01-14 14:44 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).