public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/15457] New: [tree-ssa] Convert a sign bit testing into "a < 0"
@ 2004-05-15 23:39 kazu at cs dot umass dot edu
  2004-05-15 23:41 ` [Bug tree-optimization/15457] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-05-15 23:39 UTC (permalink / raw)
  To: gcc-bugs

Convert a sign bit testing into "a < 0".

void bar (void);

void
foo (signed int a)
{
  signed int b = a & (signed int) 0x80000000;
  if (b)
    bar ();
}

void
baz (signed int a)
{
  signed int b = a & 0x80000000;
  if (b)
    bar ();
}

void
baa (signed int a)
{
  signed int b = a & (1 << 31);
  if (b)
    bar ();
}

The last tree-ssa form looks like:

;; Function foo (foo)

foo (a)
{
  int b;

<bb 0>:
  b_2 = a_1 & -2147483648;
  if (b_2 != 0) goto <L0>; else goto <L1>;

<L0>:;
  bar () [tail call];

<L1>:;
  return;

}



;; Function baz (baz)

baz (a)
{
  int b;
  int T.0;

<bb 0>:
  T.0_1 = -080000000;
  b_3 = a_2 & T.0_1;
  if (b_3 != 0) goto <L0>; else goto <L1>;

<L0>:;
  bar () [tail call];

<L1>:;
  return;

}



;; Function baa (baa)

baa (a)
{
  int b;

<bb 0>:
  b_2 = a_1 & -2147483648;
  if (b_2 != 0) goto <L0>; else goto <L1>;

<L0>:;
  bar () [tail call];

<L1>:;
  return;

}

-- 
           Summary: [tree-ssa] Convert a sign bit testing into "a < 0"
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: pessimizes-code
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kazu at cs dot umass dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug tree-optimization/15457] [tree-ssa] Convert a sign bit testing into "a < 0"
  2004-05-15 23:39 [Bug tree-optimization/15457] New: [tree-ssa] Convert a sign bit testing into "a < 0" kazu at cs dot umass dot edu
@ 2004-05-15 23:41 ` pinskia at gcc dot gnu dot org
  2004-05-16  2:43 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-15 23:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-15 12:06 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-05-15 12:06:12
               date|                            |


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


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

* [Bug tree-optimization/15457] [tree-ssa] Convert a sign bit testing into "a < 0"
  2004-05-15 23:39 [Bug tree-optimization/15457] New: [tree-ssa] Convert a sign bit testing into "a < 0" kazu at cs dot umass dot edu
  2004-05-15 23:41 ` [Bug tree-optimization/15457] " pinskia at gcc dot gnu dot org
@ 2004-05-16  2:43 ` pinskia at gcc dot gnu dot org
  2004-05-17 18:32 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-16  2:43 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |15459


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


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

* [Bug tree-optimization/15457] [tree-ssa] Convert a sign bit testing into "a < 0"
  2004-05-15 23:39 [Bug tree-optimization/15457] New: [tree-ssa] Convert a sign bit testing into "a < 0" kazu at cs dot umass dot edu
  2004-05-15 23:41 ` [Bug tree-optimization/15457] " pinskia at gcc dot gnu dot org
  2004-05-16  2:43 ` pinskia at gcc dot gnu dot org
@ 2004-05-17 18:32 ` pinskia at gcc dot gnu dot org
  2005-05-08 19:12 ` pinskia at gcc dot gnu dot org
  2005-05-24 22:07 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-17 18:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-17 02:03 -------
PR 15359 will fix foo and baa but not baz for some reason.

-- 


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


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

* [Bug tree-optimization/15457] [tree-ssa] Convert a sign bit testing into "a < 0"
  2004-05-15 23:39 [Bug tree-optimization/15457] New: [tree-ssa] Convert a sign bit testing into "a < 0" kazu at cs dot umass dot edu
                   ` (2 preceding siblings ...)
  2004-05-17 18:32 ` pinskia at gcc dot gnu dot org
@ 2005-05-08 19:12 ` pinskia at gcc dot gnu dot org
  2005-05-24 22:07 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-08 19:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-08 19:12 -------
(In reply to comment #2)
> PR 15359 will fix foo and baa but not baz for some reason.
I mean 15459.
Also this is done on the RTL level at least on PPC.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|19987                       |
              nThis|                            |
           Keywords|                            |TREE


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


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

* [Bug tree-optimization/15457] [tree-ssa] Convert a sign bit testing into "a < 0"
  2004-05-15 23:39 [Bug tree-optimization/15457] New: [tree-ssa] Convert a sign bit testing into "a < 0" kazu at cs dot umass dot edu
                   ` (3 preceding siblings ...)
  2005-05-08 19:12 ` pinskia at gcc dot gnu dot org
@ 2005-05-24 22:07 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-24 22:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-24 22:04 -------
All three are now done by PR 15459.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug tree-optimization/15457] [tree-ssa] Convert a sign bit testing into "a < 0"
       [not found] <bug-15457-4@http.gcc.gnu.org/bugzilla/>
  2012-01-05 23:12 ` pinskia at gcc dot gnu.org
@ 2014-10-31  4:02 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-10-31  4:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15457
Bug 15457 depends on bug 15459, which changed state.

Bug 15459 Summary: [meta-bug] there should be a tree combiner like the rtl one
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15459

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED


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

* [Bug tree-optimization/15457] [tree-ssa] Convert a sign bit testing into "a < 0"
       [not found] <bug-15457-4@http.gcc.gnu.org/bugzilla/>
@ 2012-01-05 23:12 ` pinskia at gcc dot gnu.org
  2014-10-31  4:02 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-05 23:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-05 23:12:07 UTC ---
Fixed since 4.3.0.


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

* [Bug tree-optimization/15457] [tree-ssa] Convert a sign bit testing into "a < 0"
       [not found] <20040515120221.15457.kazu@gcc.gnu.org>
@ 2005-07-12 21:27 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-12 21:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-12 21:27 -------
It might be a while for me to rewrite the tree combiner so unassigning for now.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|pinskia at gcc dot gnu dot  |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


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


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

end of thread, other threads:[~2014-10-31  4:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-15 23:39 [Bug tree-optimization/15457] New: [tree-ssa] Convert a sign bit testing into "a < 0" kazu at cs dot umass dot edu
2004-05-15 23:41 ` [Bug tree-optimization/15457] " pinskia at gcc dot gnu dot org
2004-05-16  2:43 ` pinskia at gcc dot gnu dot org
2004-05-17 18:32 ` pinskia at gcc dot gnu dot org
2005-05-08 19:12 ` pinskia at gcc dot gnu dot org
2005-05-24 22:07 ` pinskia at gcc dot gnu dot org
     [not found] <20040515120221.15457.kazu@gcc.gnu.org>
2005-07-12 21:27 ` pinskia at gcc dot gnu dot org
     [not found] <bug-15457-4@http.gcc.gnu.org/bugzilla/>
2012-01-05 23:12 ` pinskia at gcc dot gnu.org
2014-10-31  4:02 ` pinskia 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).