public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/45416] [4.5/4.6 Regression] Code size regression between 4.6(4.5) and 4.4 for ARM
       [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-16 13:18 ` rguenth at gcc dot gnu.org
  2011-04-28 15:13 ` [Bug middle-end/45416] [4.5/4.6/4.7 Regression] Code size regression between 4.6/4.7(4.5) " rguenth at gcc dot gnu.org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-12-16 13:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.2                       |4.5.3

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-12-16 13:03:16 UTC ---
GCC 4.5.2 is being released, adjusting target milestone.


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

* [Bug middle-end/45416] [4.5/4.6/4.7 Regression] Code size regression between 4.6/4.7(4.5) and 4.4 for ARM
       [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
  2010-12-16 13:18 ` [Bug middle-end/45416] [4.5/4.6 Regression] Code size regression between 4.6(4.5) and 4.4 for ARM rguenth at gcc dot gnu.org
@ 2011-04-28 15:13 ` rguenth at gcc dot gnu.org
  2011-04-28 15:59 ` bmei at broadcom dot com
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-28 15:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.3                       |4.5.4

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-28 14:51:27 UTC ---
GCC 4.5.3 is being released, adjusting target milestone.


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

* [Bug middle-end/45416] [4.5/4.6/4.7 Regression] Code size regression between 4.6/4.7(4.5) and 4.4 for ARM
       [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
  2010-12-16 13:18 ` [Bug middle-end/45416] [4.5/4.6 Regression] Code size regression between 4.6(4.5) and 4.4 for ARM rguenth at gcc dot gnu.org
  2011-04-28 15:13 ` [Bug middle-end/45416] [4.5/4.6/4.7 Regression] Code size regression between 4.6/4.7(4.5) " rguenth at gcc dot gnu.org
@ 2011-04-28 15:59 ` bmei at broadcom dot com
  2011-12-05 20:32 ` pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: bmei at broadcom dot com @ 2011-04-28 15:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

--- Comment #8 from Bingfeng Mei <bmei at broadcom dot com> 2011-04-28 15:22:26 UTC ---
I am currently on vacation until 4/5/2011. I may access my mail irregularly.
Cheers,
Bingfeng Mei


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

* [Bug middle-end/45416] [4.5/4.6/4.7 Regression] Code size regression between 4.6/4.7(4.5) and 4.4 for ARM
       [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-04-28 15:59 ` bmei at broadcom dot com
@ 2011-12-05 20:32 ` pinskia at gcc dot gnu.org
  2011-12-05 20:42 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-05 20:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-05 20:31:17 UTC ---
We produce better code with the trunk now:
    xorl    %eax, %eax
    testl    $1024, %edi
    setne    %al
    ret

But that is still worse than before with the and ...


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

* [Bug middle-end/45416] [4.5/4.6/4.7 Regression] Code size regression between 4.6/4.7(4.5) and 4.4 for ARM
       [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2011-12-05 20:32 ` pinskia at gcc dot gnu.org
@ 2011-12-05 20:42 ` pinskia at gcc dot gnu.org
  2011-12-05 20:52 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-05 20:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-05 20:40:59 UTC ---
  /* If this is an equality or inequality test of a single bit, we can
     do this by shifting the bit being tested to the low-order bit and
     masking the result with the constant 1.  If the condition was EQ,
     we xor it with 1.  This does not require an scc insn and is faster
     than an scc insn even if we have it.

     The code to make this transformation was moved into fold_single_bit_test,
     so we just call into the folder and expand its result.  */

  if ((code == NE || code == EQ)
      && TREE_CODE (arg0) == BIT_AND_EXPR && integer_zerop (arg1)
      && integer_pow2p (TREE_OPERAND (arg0, 1))
      && (TYPE_PRECISION (ops->type) != 1 || TYPE_UNSIGNED (ops->type)))

This needs to be updated for the out-of-ssa expand.


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

* [Bug middle-end/45416] [4.5/4.6/4.7 Regression] Code size regression between 4.6/4.7(4.5) and 4.4 for ARM
       [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2011-12-05 20:42 ` pinskia at gcc dot gnu.org
@ 2011-12-05 20:52 ` pinskia at gcc dot gnu.org
  2011-12-05 20:56 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-05 20:52 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-05 20:51:58 UTC ---
I have a patch:
Index: expr.c
===================================================================
--- expr.c    (revision 182017)
+++ expr.c    (working copy)
@@ -10563,15 +10563,24 @@ do_store_flag (sepops ops, rtx target, e
      so we just call into the folder and expand its result.  */

   if ((code == NE || code == EQ)
-      && TREE_CODE (arg0) == BIT_AND_EXPR && integer_zerop (arg1)
-      && integer_pow2p (TREE_OPERAND (arg0, 1))
+      && TREE_CODE (arg0) == SSA_NAME && integer_zerop (arg1)
       && (TYPE_PRECISION (ops->type) != 1 || TYPE_UNSIGNED (ops->type)))
     {
-      tree type = lang_hooks.types.type_for_mode (mode, unsignedp);
-      return expand_expr (fold_single_bit_test (loc,
-                        code == NE ? NE_EXPR : EQ_EXPR,
-                        arg0, arg1, type),
-              target, VOIDmode, EXPAND_NORMAL);
+      gimple srcstmt = get_gimple_for_ssa_name (arg0);
+      if (srcstmt
+      && TREE_CODE (gimple_assign_rhs_code (srcstmt)) == BIT_AND_EXPR
+      && integer_pow2p (gimple_assign_rhs2 (srcstmt))
+    {
+      enum tree_code tcode = code == NE ? NE_EXPR : EQ_EXPR;
+      tree type = lang_hooks.types.type_for_mode (mode, unsignedp);
+      tree temp = fold_build2 (loc, BIT_AND_EXPR, type,
+                   gimple_assign_rhs1 (srcstmt),
+                   gimple_assign_rhs2 (srcstmt));
+      return expand_expr (fold_single_bit_test (loc,
+                                  tcode,
+                                  arg0, arg1, type),
+                  target, VOIDmode, EXPAND_NORMAL);
+    }
     }

   if (! get_subtarget (target)


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

* [Bug middle-end/45416] [4.5/4.6/4.7 Regression] Code size regression between 4.6/4.7(4.5) and 4.4 for ARM
       [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2011-12-05 20:52 ` pinskia at gcc dot gnu.org
@ 2011-12-05 20:56 ` pinskia at gcc dot gnu.org
  2011-12-07  4:21 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-05 20:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-05 20:56:14 UTC ---
(In reply to comment #11)
> I have a patch:
With a couple of fixes above that.


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

* [Bug middle-end/45416] [4.5/4.6/4.7 Regression] Code size regression between 4.6/4.7(4.5) and 4.4 for ARM
       [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2011-12-05 20:56 ` pinskia at gcc dot gnu.org
@ 2011-12-07  4:21 ` pinskia at gcc dot gnu.org
  2011-12-07 19:23 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-07  4:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
             Target|arm-elf                     |
             Status|NEW                         |ASSIGNED
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2011-12/msg00466.htm
                   |                            |l
         AssignedTo|unassigned at gcc dot       |pinskia at gcc dot gnu.org
                   |gnu.org                     |


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

* [Bug middle-end/45416] [4.5/4.6/4.7 Regression] Code size regression between 4.6/4.7(4.5) and 4.4 for ARM
       [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2011-12-07  4:21 ` pinskia at gcc dot gnu.org
@ 2011-12-07 19:23 ` pinskia at gcc dot gnu.org
  2011-12-07 19:25 ` [Bug middle-end/45416] [4.5/4.6 " pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-07 19:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-07 19:23:13 UTC ---
Author: pinskia
Date: Wed Dec  7 19:23:10 2011
New Revision: 182084

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182084
Log:
2011-12-07  Andrew Pinski  <apinski@cavium.com>

    PR middle-end/45416
    * expr.c (do_store_flag): Rewrite code that looks for BIT_AND_EXPR for
    SSA-expand.

2011-12-07  Andrew Pinski  <apinski@cavium.com>

    PR middle-end/45416
    * gcc.dg/pr45416.c: New testcase.


Added:
    trunk/gcc/testsuite/gcc.dg/pr45416.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/expr.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug middle-end/45416] [4.5/4.6 Regression] Code size regression between 4.6/4.7(4.5) and 4.4 for ARM
       [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2011-12-07 19:23 ` pinskia at gcc dot gnu.org
@ 2011-12-07 19:25 ` pinskia at gcc dot gnu.org
  2011-12-09 13:18 ` [Bug middle-end/45416] [4.5/4.6 Regression] Code size regression from " gjl at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-07 19:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
      Known to work|                            |4.7.0
         AssignedTo|pinskia at gcc dot gnu.org  |unassigned at gcc dot
                   |                            |gnu.org
            Summary|[4.5/4.6/4.7 Regression]    |[4.5/4.6 Regression] Code
                   |Code size regression        |size regression between
                   |between 4.6/4.7(4.5) and    |4.6/4.7(4.5) and 4.4 for
                   |4.4 for ARM                 |ARM

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-07 19:24:22 UTC ---
Fixed on the trunk.  If someone wants to backport the patch, that is ok with
me.


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

* [Bug middle-end/45416] [4.5/4.6 Regression] Code size regression from 4.4 for ARM
       [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2011-12-07 19:25 ` [Bug middle-end/45416] [4.5/4.6 " pinskia at gcc dot gnu.org
@ 2011-12-09 13:18 ` gjl at gcc dot gnu.org
  2012-01-23 18:12 ` ramana at gcc dot gnu.org
  2012-02-01 14:48 ` rearnsha at gcc dot gnu.org
  12 siblings, 0 replies; 13+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-12-09 13:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eric.weddington at atmel
                   |                            |dot com, gjl at gcc dot
                   |                            |gnu.org

--- Comment #15 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-12-09 13:01:39 UTC ---
Appears that the patch leads to code bloat on AVR at least.

It is general wrong to assume that it's cheap to perform x >> n without caring
for the underlying architecture.


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

* [Bug middle-end/45416] [4.5/4.6 Regression] Code size regression from 4.4 for ARM
       [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2011-12-09 13:18 ` [Bug middle-end/45416] [4.5/4.6 Regression] Code size regression from " gjl at gcc dot gnu.org
@ 2012-01-23 18:12 ` ramana at gcc dot gnu.org
  2012-02-01 14:48 ` rearnsha at gcc dot gnu.org
  12 siblings, 0 replies; 13+ messages in thread
From: ramana at gcc dot gnu.org @ 2012-01-23 18:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

--- Comment #16 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2012-01-23 17:59:56 UTC ---
Author: ramana
Date: Mon Jan 23 17:59:51 2012
New Revision: 183446

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183446
Log:


2012-01-23  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

       PR middle-end/45416
        * gcc.dg/pr45416.c: Skip if Thumb1. Handle ubfx.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/pr45416.c


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

* [Bug middle-end/45416] [4.5/4.6 Regression] Code size regression from 4.4 for ARM
       [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2012-01-23 18:12 ` ramana at gcc dot gnu.org
@ 2012-02-01 14:48 ` rearnsha at gcc dot gnu.org
  12 siblings, 0 replies; 13+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-02-01 14:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |arm
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.5.4                       |4.7.0

--- Comment #17 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2012-02-01 14:47:09 UTC ---
fixed.  Not a wrong-code bug, so not backporting.


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

end of thread, other threads:[~2012-02-01 14:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-45416-4@http.gcc.gnu.org/bugzilla/>
2010-12-16 13:18 ` [Bug middle-end/45416] [4.5/4.6 Regression] Code size regression between 4.6(4.5) and 4.4 for ARM rguenth at gcc dot gnu.org
2011-04-28 15:13 ` [Bug middle-end/45416] [4.5/4.6/4.7 Regression] Code size regression between 4.6/4.7(4.5) " rguenth at gcc dot gnu.org
2011-04-28 15:59 ` bmei at broadcom dot com
2011-12-05 20:32 ` pinskia at gcc dot gnu.org
2011-12-05 20:42 ` pinskia at gcc dot gnu.org
2011-12-05 20:52 ` pinskia at gcc dot gnu.org
2011-12-05 20:56 ` pinskia at gcc dot gnu.org
2011-12-07  4:21 ` pinskia at gcc dot gnu.org
2011-12-07 19:23 ` pinskia at gcc dot gnu.org
2011-12-07 19:25 ` [Bug middle-end/45416] [4.5/4.6 " pinskia at gcc dot gnu.org
2011-12-09 13:18 ` [Bug middle-end/45416] [4.5/4.6 Regression] Code size regression from " gjl at gcc dot gnu.org
2012-01-23 18:12 ` ramana at gcc dot gnu.org
2012-02-01 14:48 ` rearnsha at gcc dot gnu.org

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