public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Hurugalawadi, Naveen" <Naveen.Hurugalawadi@caviumnetworks.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Allow widening multiplication in tree-ssa/slsr-*.c
Date: Wed, 16 Jan 2013 05:21:00 -0000	[thread overview]
Message-ID: <F3068DEED1A463459E0887A091B15493384B48@BY2PRD0710MB364.namprd07.prod.outlook.com> (raw)

[-- 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" } } */

             reply	other threads:[~2013-01-16  5:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16  5:21 Hurugalawadi, Naveen [this message]
2013-01-16  5:27 ` Andrew Pinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F3068DEED1A463459E0887A091B15493384B48@BY2PRD0710MB364.namprd07.prod.outlook.com \
    --to=naveen.hurugalawadi@caviumnetworks.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).