public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Allow widening multiplication in tree-ssa/slsr-*.c
@ 2013-01-16  5:21 Hurugalawadi, Naveen
  2013-01-16  5:27 ` Andrew Pinski
  0 siblings, 1 reply; 2+ messages in thread
From: Hurugalawadi, Naveen @ 2013-01-16  5:21 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 907 bytes --]

Hi,

The slsr-*.c testsuite failures are due to not matching widening add
(or multiply-add) in AARCH64.
The LP64 targets generates WIDEN_MULT_PLUS_EXPR which is correct and
even better code generation will be produced. However, the testcase
expects +OP2 in these cases and hence FAIL's.

Please find attached the patch that checks "+ OP2" as earlier OR 
", OP2>" as produced with "WIDEN_MULT_PLUS_EXPR <1(D), 4, 12>" in LP64
targets that use a widening multiplication. 

Tested on aarch64-thunder-elf, x86_64-elf, arm-none-eabi and rx-elf.

Please review the patch and let me know if there should be any further
modifications in pattern check.

Regards,
Naveen

2013-01-16   Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

gcc/testsuite/
	* gcc.dg/tree-ssa/slsr-1.c: Allow widening multiplications.
	* gcc.dg/tree-ssa/slsr-2.c: Likewise.
	* gcc.dg/tree-ssa/slsr-3.c: Likewise.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: slsr.patch --]
[-- Type: text/x-patch; name="slsr.patch", Size: 2060 bytes --]

--- gcc/testsuite/gcc.dg/tree-ssa/slsr-1.c	2013-01-15 14:57:30.307425565 +0530
+++ gcc/testsuite/gcc.dg/tree-ssa/slsr-1.c	2013-01-15 15:04:02.087432920 +0530
@@ -14,7 +14,7 @@ f (int *p, unsigned int n)
     foo (*(p + 48 + n * 4));
 }
 
-/* { dg-final { scan-tree-dump-times "\\+ 128" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "\\+ 64" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "\\+ 192" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 128|\\, 128>" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 64|\\, 64>" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 192|\\, 192>" 1 "optimized" } } */
 /* { dg-final { cleanup-tree-dump "optimized" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/slsr-2.c	2012-12-14 09:53:42.925262994 +0530
+++ gcc/testsuite/gcc.dg/tree-ssa/slsr-2.c	2013-01-15 15:05:30.543434580 +0530
@@ -11,6 +11,6 @@ f (int *p, int n)
   foo (*(p + 16 + n * 4));
 }
 
-/* { dg-final { scan-tree-dump-times "\\+ 144" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "\\+ 96" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 144|\\, 144>" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 96|\\, 96>" 1 "optimized" } } */
 /* { dg-final { cleanup-tree-dump "optimized" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/slsr-3.c	2012-12-14 09:53:42.925262994 +0530
+++ gcc/testsuite/gcc.dg/tree-ssa/slsr-3.c	2013-01-15 15:47:23.447481757 +0530
@@ -16,7 +16,7 @@ foo (int a[], int b[], int i)
 }
 
 /* { dg-final { scan-tree-dump-times "\\* 4" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "\\+ 4" 2 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "\\+ 8" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "\\+ 12" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 4|\\, 4>" 2 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 8|\\, 8>" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 12|\\, 12>" 1 "optimized" } } */
 /* { dg-final { cleanup-tree-dump "optimized" } } */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Allow widening multiplication in tree-ssa/slsr-*.c
  2013-01-16  5:21 Allow widening multiplication in tree-ssa/slsr-*.c Hurugalawadi, Naveen
@ 2013-01-16  5:27 ` Andrew Pinski
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Pinski @ 2013-01-16  5:27 UTC (permalink / raw)
  To: Hurugalawadi, Naveen; +Cc: gcc-patches

On Tue, Jan 15, 2013 at 9:21 PM, Hurugalawadi, Naveen
<Naveen.Hurugalawadi@caviumnetworks.com> wrote:
> Hi,
>
> The slsr-*.c testsuite failures are due to not matching widening add
> (or multiply-add) in AARCH64.
> The LP64 targets generates WIDEN_MULT_PLUS_EXPR which is correct and
> even better code generation will be produced. However, the testcase
> expects +OP2 in these cases and hence FAIL's.
>
> Please find attached the patch that checks "+ OP2" as earlier OR
> ", OP2>" as produced with "WIDEN_MULT_PLUS_EXPR <1(D), 4, 12>" in LP64
> targets that use a widening multiplication.

It is not the target is LP64 but rather the target supports unsigned
widening from 32bit to 64bit multiple/plus instruction.
It is one of the few targets which support this.

Thanks,
Andrew Pinski

>
> Tested on aarch64-thunder-elf, x86_64-elf, arm-none-eabi and rx-elf.
>
> Please review the patch and let me know if there should be any further
> modifications in pattern check.
>
> Regards,
> Naveen
>
> 2013-01-16   Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>
>
> gcc/testsuite/
>         * gcc.dg/tree-ssa/slsr-1.c: Allow widening multiplications.
>         * gcc.dg/tree-ssa/slsr-2.c: Likewise.
>         * gcc.dg/tree-ssa/slsr-3.c: Likewise.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-16  5:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-16  5:21 Allow widening multiplication in tree-ssa/slsr-*.c Hurugalawadi, Naveen
2013-01-16  5:27 ` Andrew Pinski

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).