public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hongjiu.lu@intel.com>
To: gcc-patches@gcc.gnu.org, Uros Bizjak <ubizjak@gmail.com>
Subject: Re: [PATCH] Adjust variable shift costs for IA MCU
Date: Mon, 24 Aug 2015 15:36:00 -0000	[thread overview]
Message-ID: <20150824153227.GA20086@intel.com> (raw)
In-Reply-To: <20150709180527.GA29480@intel.com>

On Thu, Jul 09, 2015 at 11:05:27AM -0700, H.J. Lu wrote:
> We reduce code size for IA MCU by adjusting variable shift costs for IA
> MCU.  OK for trunk?
> 
> Thanks.
> 
> 
> H.J.
> ---
> 	PR target/66821
> 	* config/i386/i386.c (iamcu_cost): Adjust variable shift costs.

I checked in this patch to add a testcase for PR target/66821.


H.J.
---
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 227132)
+++ ChangeLog	(working copy)
@@ -1,5 +1,10 @@
 2015-08-24  H.J. Lu  <hongjiu.lu@intel.com>
 
+	PR target/66821
+	* gcc.target/i386/pr66821.c: New test.
+
+2015-08-24  H.J. Lu  <hongjiu.lu@intel.com>
+
 	PR target/67329
 	* gcc.target/i386/pr67329.c: New test.
 
Index: gcc.target/i386/pr66821.c
===================================================================
--- gcc.target/i386/pr66821.c	(revision 0)
+++ gcc.target/i386/pr66821.c	(working copy)
@@ -0,0 +1,15 @@
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -fdump-tree-optimized -mtune=iamcu" } */
+
+void bar (void);
+
+void
+foo (int x)
+{
+  if (x != 2 && x != 3 && x != 10 && x != 11 && x != 17 && x != 18 && x != 23)
+    bar ();
+}
+
+/* Check if the tests have been folded into a bit test.  */
+/* { dg-final { scan-tree-dump "(8784908|0x0*860c0c)" "optimized" } } */
+/* { dg-final { scan-tree-dump "(<<|>>)" "optimized" } } */

      parent reply	other threads:[~2015-08-24 15:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09 18:05 H.J. Lu
2015-07-09 20:30 ` Uros Bizjak
2015-07-09 20:36   ` H.J. Lu
2015-08-24 15:36 ` H.J. Lu [this message]

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=20150824153227.GA20086@intel.com \
    --to=hongjiu.lu@intel.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=ubizjak@gmail.com \
    /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).