public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level
@ 2004-03-05  6:30 pinskia at gcc dot gnu dot org
  2004-03-05  6:31 ` [Bug optimization/14442] " pinskia at gcc dot gnu dot org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-05  6:30 UTC (permalink / raw)
  To: gcc-bugs

These two functions should produce the same asm (drivided from GCC's sources):
_Bool t();
_Bool t1();

_Bool f(int i)
{
   if (!t())
    return 0;
   return t1();
}
_Bool f1()
{
  return t() && t1();
}

-- 
           Summary: [tree-ssa] missed sib if conversion optimization on the
                    tree level
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: pessimizes-code
          Severity: enhancement
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
@ 2004-03-05  6:31 ` pinskia at gcc dot gnu dot org
  2004-03-06  4:00 ` pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-05  6:31 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |tree-ssa


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


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

* [Bug optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
  2004-03-05  6:31 ` [Bug optimization/14442] " pinskia at gcc dot gnu dot org
@ 2004-03-06  4:00 ` pinskia at gcc dot gnu dot org
  2004-03-07  3:44 ` pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-06  4:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-06 04:00 -------
Confirmed again by honza on the IRC, he said it will be fixed after the merge of the tree-
ssa into the mainline by the same patch which will fix 14440.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |14440
              nThis|                            |
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-06 04:00:06
               date|                            |


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


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

* [Bug optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
  2004-03-05  6:31 ` [Bug optimization/14442] " pinskia at gcc dot gnu dot org
  2004-03-06  4:00 ` pinskia at gcc dot gnu dot org
@ 2004-03-07  3:44 ` pinskia at gcc dot gnu dot org
  2004-04-05  1:06 ` pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-07  3:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-07 03:44 -------
Woops wrong PR.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|14440                       |
              nThis|                            |


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


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

* [Bug optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-03-07  3:44 ` pinskia at gcc dot gnu dot org
@ 2004-04-05  1:06 ` pinskia at gcc dot gnu dot org
  2004-05-15 16:40 ` [Bug tree-optimization/14442] " pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-05  1:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-05 01:06 -------
f1 right now is equivement to
_Bool f2()
{
  int t3 = 0;
  if (t())
    if (t1())
      t3 = 1;
   return t3;
}

-- 


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


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

* [Bug tree-optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-04-05  1:06 ` pinskia at gcc dot gnu dot org
@ 2004-05-15 16:40 ` pinskia at gcc dot gnu dot org
  2004-05-17 15:40 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-15 16:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-14 22:11 -------
The problem here is tree-ssa-phi-opt is not smart enough:
  T.2_6 = t1 ();
  if (T.2_6 == 0) goto <L2>; else goto <L3>;

<L2>:;

  # iftmp.0_1 = PHI <0(2), 0(0), 1(1)>;
<L3>:;
  T.3_3 = (_Bool)iftmp.0_1;
  return (int)T.3_3;

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2004-03-06 04:00:06         |2004-05-14 22:11:13
               date|                            |


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


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

* [Bug tree-optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-05-15 16:40 ` [Bug tree-optimization/14442] " pinskia at gcc dot gnu dot org
@ 2004-05-17 15:40 ` pinskia at gcc dot gnu dot org
  2004-05-24 17:46 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-17 15:40 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 14442 depends on bug 14440, which changed state.

Bug 14440 Summary: [3.5 regression] no sib calling with _Bool types
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14440

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

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


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

* [Bug tree-optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-05-17 15:40 ` pinskia at gcc dot gnu dot org
@ 2004-05-24 17:46 ` pinskia at gcc dot gnu dot org
  2004-06-07 18:13 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24 17:46 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.5.0                       |---


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


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

* [Bug tree-optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-05-24 17:46 ` pinskia at gcc dot gnu dot org
@ 2004-06-07 18:13 ` pinskia at gcc dot gnu dot org
  2004-06-09 23:55 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-07 18:13 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 14442 depends on bug 14440, which changed state.

Bug 14440 Summary: [3.5 regression] no sib calling with _Bool types
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14440

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

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


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

* [Bug tree-optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2004-06-07 18:13 ` pinskia at gcc dot gnu dot org
@ 2004-06-09 23:55 ` pinskia at gcc dot gnu dot org
  2004-09-28 18:29 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-09 23:55 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 14442 depends on bug 14440, which changed state.

Bug 14440 Summary: [3.5 regression] no sib calling with _Bool types
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14440

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

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


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

* [Bug tree-optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2004-06-09 23:55 ` pinskia at gcc dot gnu dot org
@ 2004-09-28 18:29 ` pinskia at gcc dot gnu dot org
  2004-09-28 20:01 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-28 18:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-28 18:29 -------
Mine, PHI-OPT is not smart enough.

-- 
           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=14442


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

* [Bug tree-optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2004-09-28 18:29 ` pinskia at gcc dot gnu dot org
@ 2004-09-28 20:01 ` pinskia at gcc dot gnu dot org
  2004-09-29  2:40 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-28 20:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-28 20:01 -------
With some work I have it down to:
f1 ()
{
  _Bool D.1122;
  _Bool D.1120;
  int iftmp.0;

<bb 0>:
  D.1120 = t ();
  if (D.1120 == 0) goto <L6>; else goto <L0>;

<L6>:;
  iftmp.0 = 0;
  goto <bb 2> (<L3>);

<L0>:;
  D.1122 = t1 ();
  iftmp.0 = (int) !(D.1122 == 0);  <-- still can be fixed some more to just (int) (D.1122). but that will be 
a fold issue (there is another bug about that).

<L3>:;
  return (int) (_Bool) iftmp.0;

}

-- 


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


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

* [Bug tree-optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2004-09-28 20:01 ` pinskia at gcc dot gnu dot org
@ 2004-09-29  2:40 ` pinskia at gcc dot gnu dot org
  2005-03-08  0:41 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-29  2:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-29 02:40 -------
Basically PR 17671 is the PR for the new PHI-OPT and PR 15618 is for fold a!=0 to a when a is of the 
boolean_type.  Also note the C++ front-end for the code in comment 3 (when the int is changed to 
bool) is already fixed by the new PHI-OPT.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |15618, 17671


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


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

* [Bug tree-optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2004-09-29  2:40 ` pinskia at gcc dot gnu dot org
@ 2005-03-08  0:41 ` pinskia at gcc dot gnu dot org
  2005-05-01 18:26 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-08  0:41 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 14442 depends on bug 17671, which changed state.

Bug 17671 Summary: PHI-OPT is not smart enough
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17671

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

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


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

* [Bug tree-optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2005-03-08  0:41 ` pinskia at gcc dot gnu dot org
@ 2005-05-01 18:26 ` pinskia at gcc dot gnu dot org
  2005-05-01 18:44 ` pinskia at gcc dot gnu dot org
  2005-05-04  1:52 ` pinskia at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-01 18:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-01 18:26 -------
(In reply to comment #7)
> Basically PR 17671 is the PR for the new PHI-OPT and PR 15618 is for fold a!=0 to a when a is of the 
> boolean_type.  Also note the C++ front-end for the code in comment 3 (when the int is changed to 
> bool) is already fixed by the new PHI-OPT.

Actually PHI-OPT needs to improved after the patch for PR 15618 is applied, instead of creating one 
statement at a time and then letting the passes after wards fold it (which does not happen right now), 
we should instead create one new statement which fold as we build it.

-- 


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


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

* [Bug tree-optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2005-05-01 18:26 ` pinskia at gcc dot gnu dot org
@ 2005-05-01 18:44 ` pinskia at gcc dot gnu dot org
  2005-05-04  1:52 ` pinskia at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-01 18:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-01 18:44 -------
(In reply to comment #8)
> Actually PHI-OPT needs to improved after the patch for PR 15618 is applied, instead of creating one 
> statement at a time and then letting the passes after wards fold it (which does not happen right now), 
> we should instead create one new statement which fold as we build it.

Actually I am wrong, we just need a fold around the invert_truthvalue call.

Mine still.

-- 


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


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

* [Bug tree-optimization/14442] [tree-ssa] missed sib if conversion optimization on the tree level
  2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2005-05-01 18:44 ` pinskia at gcc dot gnu dot org
@ 2005-05-04  1:52 ` pinskia at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-04  1:52 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 14442 depends on bug 15618, which changed state.

Bug 15618 Summary: Missed bool optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15618

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

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


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

end of thread, other threads:[~2005-05-04  1:52 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-05  6:30 [Bug optimization/14442] New: [tree-ssa] missed sib if conversion optimization on the tree level pinskia at gcc dot gnu dot org
2004-03-05  6:31 ` [Bug optimization/14442] " pinskia at gcc dot gnu dot org
2004-03-06  4:00 ` pinskia at gcc dot gnu dot org
2004-03-07  3:44 ` pinskia at gcc dot gnu dot org
2004-04-05  1:06 ` pinskia at gcc dot gnu dot org
2004-05-15 16:40 ` [Bug tree-optimization/14442] " pinskia at gcc dot gnu dot org
2004-05-17 15:40 ` pinskia at gcc dot gnu dot org
2004-05-24 17:46 ` pinskia at gcc dot gnu dot org
2004-06-07 18:13 ` pinskia at gcc dot gnu dot org
2004-06-09 23:55 ` pinskia at gcc dot gnu dot org
2004-09-28 18:29 ` pinskia at gcc dot gnu dot org
2004-09-28 20:01 ` pinskia at gcc dot gnu dot org
2004-09-29  2:40 ` pinskia at gcc dot gnu dot org
2005-03-08  0:41 ` pinskia at gcc dot gnu dot org
2005-05-01 18:26 ` pinskia at gcc dot gnu dot org
2005-05-01 18:44 ` pinskia at gcc dot gnu dot org
2005-05-04  1:52 ` pinskia at gcc dot gnu dot 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).