public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types
@ 2004-03-05  6:18 pinskia at gcc dot gnu dot org
  2004-03-05  6:23 ` [Bug optimization/14440] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-05  6:18 UTC (permalink / raw)
  To: gcc-bugs

Here is a regression from the mainline:
_Bool t();

_Bool f(int i)
{
 return t();
}

t should be sibcalled but is not because the return type of f is really still int for some 
reason by the front-end (both the C and C++ front-ends, you have to #define _Bool bool 
for the C++ front-end to work though).

-- 
           Summary: [tree-ssa] [regression] no sib calling with _Bool types
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: pessimizes-code
          Severity: normal
          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=14440


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

* [Bug optimization/14440] [tree-ssa] [regression] no sib calling with _Bool types
  2004-03-05  6:18 [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types pinskia at gcc dot gnu dot org
@ 2004-03-05  6:23 ` pinskia at gcc dot gnu dot org
  2004-03-05  6:24 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-05  6:23 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug optimization/14440] [tree-ssa] [regression] no sib calling with _Bool types
  2004-03-05  6:18 [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types pinskia at gcc dot gnu dot org
  2004-03-05  6:23 ` [Bug optimization/14440] " pinskia at gcc dot gnu dot org
@ 2004-03-05  6:24 ` pinskia at gcc dot gnu dot org
  2004-03-06  3:58 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-05  6:24 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   GCC host triplet|                            |powerpc-apple-darwin
      Known to fail|                            |tree-ssa
      Known to work|                            |3.4.0


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


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

* [Bug optimization/14440] [tree-ssa] [regression] no sib calling with _Bool types
  2004-03-05  6:18 [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types pinskia at gcc dot gnu dot org
  2004-03-05  6:23 ` [Bug optimization/14440] " pinskia at gcc dot gnu dot org
  2004-03-05  6:24 ` pinskia at gcc dot gnu dot org
@ 2004-03-06  3:58 ` pinskia at gcc dot gnu dot org
  2004-04-23  4:28 ` bje at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-06  3:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-06 03:58 -------
Confirmed by honza on IRC.  This is not important so moving the severtity to minor, this 
will be fixed after the merge.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-06 03:58:22
               date|                            |


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


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

* [Bug optimization/14440] [tree-ssa] [regression] no sib calling with _Bool types
  2004-03-05  6:18 [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-03-06  3:58 ` pinskia at gcc dot gnu dot org
@ 2004-04-23  4:28 ` bje at gcc dot gnu dot org
  2004-04-23  5:43 ` bje at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: bje at gcc dot gnu dot org @ 2004-04-23  4:28 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug optimization/14440] [tree-ssa] [regression] no sib calling with _Bool types
  2004-03-05  6:18 [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-04-23  4:28 ` bje at gcc dot gnu dot org
@ 2004-04-23  5:43 ` bje at gcc dot gnu dot org
  2004-04-23 11:21 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: bje at gcc dot gnu dot org @ 2004-04-23  5:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bje at gcc dot gnu dot org  2004-04-23 04:59 -------
Are you sure this is a regression?  I agree there is a problem here, but I see
the same results with 3.3 branch, 3.4 branch, tree-ssa and mainline when
compiling with -O2:

        .file   "pr14440.c"
        .text
        .p2align 2,,3
.globl f
        .type   f, @function
f:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $8, %esp
        call    t
        movzbl  %al, %eax
        leave
        ret
        .size   f, .-f
        .section        .note.GNU-stack,"",@progbits
        .ident  "GCC: (GNU) 3.4.1 20040422 (prerelease)"

-- 


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


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

* [Bug optimization/14440] [tree-ssa] [regression] no sib calling with _Bool types
  2004-03-05  6:18 [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-04-23  5:43 ` bje at gcc dot gnu dot org
@ 2004-04-23 11:21 ` pinskia at gcc dot gnu dot org
  2004-05-07  0:10 ` dann at godzilla dot ics dot uci dot edu
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-23 11:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-23 11:05 -------
Yes this is a regression on powerpc-apple-darwin where _Bool is the same size as int.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   GCC host triplet|powerpc-apple-darwin        |
 GCC target triplet|                            |powerpc-apple-darwin


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


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

* [Bug optimization/14440] [tree-ssa] [regression] no sib calling with _Bool types
  2004-03-05  6:18 [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-04-23 11:21 ` pinskia at gcc dot gnu dot org
@ 2004-05-07  0:10 ` dann at godzilla dot ics dot uci dot edu
  2004-05-07  1:21 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2004-05-07  0:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dann at godzilla dot ics dot uci dot edu  2004-05-07 00:10 -------
It seems that is caused by what is mentioned at the end of:
http://gcc.gnu.org/ml/gcc-patches/2004-04/msg01958.html

The problem happens not only for bools, but for all functions returning a type for
which c_promoting_integer_type_p is true. 

I think that fiddling with the return type in "start_function" is too early for
tree-ssa (if it is needed at all). I have a patch that just deletes that fiddling,
it passes testing, it will be posted after the merge. 

-- 


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


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

* [Bug optimization/14440] [tree-ssa] [regression] no sib calling with _Bool types
  2004-03-05  6:18 [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-05-07  0:10 ` dann at godzilla dot ics dot uci dot edu
@ 2004-05-07  1:21 ` pinskia at gcc dot gnu dot org
  2004-05-17 15:38 ` [Bug tree-optimization/14440] [3.5 regression] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-07  1:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-07 01:21 -------
This is not fixed by the same patch for PR 14441 as it is not a NOP expression see the patch which Dan 
references which is needed to fix it.

-- 


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


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

* [Bug tree-optimization/14440] [3.5 regression] no sib calling with _Bool types
  2004-03-05  6:18 [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2004-05-07  1:21 ` pinskia at gcc dot gnu dot org
@ 2004-05-17 15:38 ` pinskia at gcc dot gnu dot org
  2004-06-07 18:13 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-17 15:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-17 01:01 -------
Fixed by:
2004-05-14  Steven Bosscher  <stevenb@suse.de>

        PR opt/14472
        * tree-tailcall.c (process_assignment): Use STRIP_NOPS to
        ignore type conversions that do not inhibit tail calling.
        (find_tail_calls): Likewise.

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


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


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

* [Bug tree-optimization/14440] [3.5 regression] no sib calling with _Bool types
  2004-03-05  6:18 [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types pinskia at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2004-05-17 15:38 ` [Bug tree-optimization/14440] [3.5 regression] " pinskia at gcc dot gnu dot org
@ 2004-06-07 18:13 ` pinskia at gcc dot gnu dot org
  2004-06-07 18:37 ` pinskia at gcc dot gnu dot org
  2004-06-09 23:54 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-07 18:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-07 18:13 -------
Re-introduced by:
2004-06-07  Richard Henderson  <rth@redhat.com>

        * gimple-low.c (struct lower_data): Add the_return_label and
        one_return_stmt.
        (lower_function_body): Initialize and use them.
        (lower_return_expr): New.
        (lower_stmt): Call it.
        * gimplify.c (gimplify_return_expr): Force the argument to be either
        null or a result_decl.
        * tree-gimple.c: Update gimple grammer to match.
        * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Deny
        coalescing of result_decls.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |steven at gcc dot gnu dot
                   |                            |org
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


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


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

* [Bug tree-optimization/14440] [3.5 regression] no sib calling with _Bool types
  2004-03-05  6:18 [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types pinskia at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2004-06-07 18:13 ` pinskia at gcc dot gnu dot org
@ 2004-06-07 18:37 ` pinskia at gcc dot gnu dot org
  2004-06-09 23:54 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-07 18:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-07 18:37 -------
Here is the testcase I would add to the testsuite so this does not happen again:
/* { dg-do compile { target "powerpc-*-darwin*" } } */
/* { dg-options "-O2 -fdump-tree-tailc-details" } */
_Bool t();
_Bool f(int i)
{
 return t();
}
/* { dg-final { scan-tree-dump-times "Found tail call" 1 "tailc"} } */

-- 


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


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

* [Bug tree-optimization/14440] [3.5 regression] no sib calling with _Bool types
  2004-03-05  6:18 [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types pinskia at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2004-06-07 18:37 ` pinskia at gcc dot gnu dot org
@ 2004-06-09 23:54 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-09 23:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-09 23:54 -------
This is fixed with the fix for 15108.

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


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


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

end of thread, other threads:[~2004-06-09 23:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-05  6:18 [Bug optimization/14440] New: [tree-ssa] [regression] no sib calling with _Bool types pinskia at gcc dot gnu dot org
2004-03-05  6:23 ` [Bug optimization/14440] " pinskia at gcc dot gnu dot org
2004-03-05  6:24 ` pinskia at gcc dot gnu dot org
2004-03-06  3:58 ` pinskia at gcc dot gnu dot org
2004-04-23  4:28 ` bje at gcc dot gnu dot org
2004-04-23  5:43 ` bje at gcc dot gnu dot org
2004-04-23 11:21 ` pinskia at gcc dot gnu dot org
2004-05-07  0:10 ` dann at godzilla dot ics dot uci dot edu
2004-05-07  1:21 ` pinskia at gcc dot gnu dot org
2004-05-17 15:38 ` [Bug tree-optimization/14440] [3.5 regression] " pinskia at gcc dot gnu dot org
2004-06-07 18:13 ` pinskia at gcc dot gnu dot org
2004-06-07 18:37 ` pinskia at gcc dot gnu dot org
2004-06-09 23:54 ` 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).