public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails
@ 2004-03-12  0:17 kazu at cs dot umass dot edu
  2004-03-12  0:18 ` [Bug optimization/14541] " kazu at cs dot umass dot edu
                   ` (12 more replies)
  0 siblings, 13 replies; 26+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-12  0:17 UTC (permalink / raw)
  To: gcc-bugs

Here is a reduced testcase.
Basically, link_error won't go away.
This testcase works on mainline, so this is a regression.

extern double log (double);
extern double exp (double);
extern void link_failure (void);

void
test (double d1)
{
  if (log (exp (d1)) != d1)
    link_failure ();
}

int
main (void)
{
  return 0;
}

-- 
           Summary: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails
           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: kazu at cs dot umass dot edu
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: h8300-elf


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


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

* [Bug optimization/14541] [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails
  2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
@ 2004-03-12  0:18 ` kazu at cs dot umass dot edu
  2004-03-12  0:26 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-12  0:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kazu at cs dot umass dot edu  2004-03-12 00:18 -------
By the way, I specify -ffast-math on both mainline and tree-ssa to compile
this testcase.


-- 


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


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

* [Bug optimization/14541] [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails
  2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
  2004-03-12  0:18 ` [Bug optimization/14541] " kazu at cs dot umass dot edu
@ 2004-03-12  0:26 ` pinskia at gcc dot gnu dot org
  2004-03-12  2:40 ` [Bug optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level kazu at cs dot umass dot edu
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-12  0:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-12 00:26 -------
Confirmed, the problem is that the builtin expanders do not see log(exp(x)) but rather they see log(T)
where T was set before the call to log to be exp(x).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-12 00:26:10
               date|                            |
   Target Milestone|---                         |tree-ssa


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


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

* [Bug optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
  2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
  2004-03-12  0:18 ` [Bug optimization/14541] " kazu at cs dot umass dot edu
  2004-03-12  0:26 ` pinskia at gcc dot gnu dot org
@ 2004-03-12  2:40 ` kazu at cs dot umass dot edu
  2004-03-12 15:30 ` amacleod at redhat dot com
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-12  2:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kazu at cs dot umass dot edu  2004-03-12 02:40 -------
Removing target because this PR is machine independent.

All of the following fail to be optimized at tree level.

gcc.dg/torture/builtin-explog-1.c
gcc.dg/builtins-10.c
gcc.dg/builtins-26.c
gcc.dg/builtins-7.c

I don't think it's worth creating another PR.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
 GCC target triplet|h8300-elf                   |
            Summary|[tree-ssa]                  |[tree-ssa] built-in math
                   |gcc.dg/torture/builtin-     |functions are not fully
                   |explog-1.c fails            |optimized at tree level


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


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

* [Bug optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
  2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
                   ` (2 preceding siblings ...)
  2004-03-12  2:40 ` [Bug optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level kazu at cs dot umass dot edu
@ 2004-03-12 15:30 ` amacleod at redhat dot com
  2004-03-25  0:09 ` bje at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: amacleod at redhat dot com @ 2004-03-12 15:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amacleod at redhat dot com  2004-03-12 15:30 -------
Which expanders?  

Am I looking at something wrong?  I see optimized tree code:

test (d1)
{
  double T.1;
  double T.0;

<bb 0>:
  if (log (exp (d1<D1066>)) != d1<D1066>) goto <L0>; else goto <L1>;

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

<L1>:;
  return;

}


And if I put a breakpoint in  expand_builtin_mathfn() I see:

Breakpoint 4, expand_builtin_mathfn (exp=0x400231e0, target=0x0, subtarget=0x0)
    at /src/tree-ssa/2004-03-09/gcc/gcc/builtins.c:1704
1704	  tree fndecl = get_callee_fndecl (exp);
(gdb) p print_generic_expr (stderr, exp, 64)
log (exp (d1))
$1 = void

Its true that we dont get rid of the link_failure(), but I dont see a temp in
there...

Andrew

-- 


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


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

* [Bug optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
  2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
                   ` (3 preceding siblings ...)
  2004-03-12 15:30 ` amacleod at redhat dot com
@ 2004-03-25  0:09 ` bje at gcc dot gnu dot org
  2004-05-03 12:37 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: bje at gcc dot gnu dot org @ 2004-03-25  0:09 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=14541


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

* [Bug optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
  2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
                   ` (4 preceding siblings ...)
  2004-03-25  0:09 ` bje at gcc dot gnu dot org
@ 2004-05-03 12:37 ` pinskia at gcc dot gnu dot org
  2004-05-04  7:56 ` kazu at cs dot umass dot edu
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-03 12:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-03 12:37 -------
Fixed by:
2004-04-30  Richard Henderson  <rth@redhat.com>

        * builtins.c (validate_arglist): Don't reject side effects.
        (simplify_builtin_strcpy): Do reject side effects in length.


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


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


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

* [Bug optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
  2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
                   ` (5 preceding siblings ...)
  2004-05-03 12:37 ` pinskia at gcc dot gnu dot org
@ 2004-05-04  7:56 ` kazu at cs dot umass dot edu
  2004-05-04 11:32 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-05-04  7:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kazu at cs dot umass dot edu  2004-05-04 07:56 -------
Andrew Pinski, are you sure this is fixed?
I just tried the testcase with the latest tree-ssa branch, and
confirmed that link_error did not go away.

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


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


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

* [Bug optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
  2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
                   ` (6 preceding siblings ...)
  2004-05-04  7:56 ` kazu at cs dot umass dot edu
@ 2004-05-04 11:32 ` pinskia at gcc dot gnu dot org
  2004-05-04 15:52 ` kazu at cs dot umass dot edu
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-04 11:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-04 11:32 -------
Note on the mainline I also need -ffast-math to get rid of the link_error is I think this is not a bug.

-- 


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


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

* [Bug optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
  2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
                   ` (7 preceding siblings ...)
  2004-05-04 11:32 ` pinskia at gcc dot gnu dot org
@ 2004-05-04 15:52 ` kazu at cs dot umass dot edu
  2004-05-04 15:57 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-05-04 15:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kazu at cs dot umass dot edu  2004-05-04 15:52 -------
Oops, I forgot -ffast-math.  Still, if I go thourgh a temporary like so:

void
test (double d1)
{
  double tem = exp (d1);
  if (log (tem) != d1)
    link_failure ();
}

the link_failure does not go away even with -ffast-math.


-- 


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


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

* [Bug optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
  2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
                   ` (8 preceding siblings ...)
  2004-05-04 15:52 ` kazu at cs dot umass dot edu
@ 2004-05-04 15:57 ` pinskia at gcc dot gnu dot org
  2004-05-24 21:48 ` [Bug tree-optimization/14541] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-04 15:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-04 15:57 -------
Agreed but now this is an enhancement as the mainline does do it either.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|minor                       |enhancement
             Status|REOPENED                    |ASSIGNED


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


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
  2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
                   ` (9 preceding siblings ...)
  2004-05-04 15:57 ` pinskia at gcc dot gnu dot org
@ 2004-05-24 21:48 ` pinskia at gcc dot gnu dot org
  2004-06-01  1:47 ` pinskia at gcc dot gnu dot org
  2004-06-21  5:15 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24 21:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-24 01:18 -------
Mine as I am working on the tree combiner and since fold already works for this there is no need for 
anything else.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |15459
         AssignedTo|bje at gcc dot gnu dot org  |pinskia at gcc dot gnu dot
                   |                            |org
   Target Milestone|3.5.0                       |---


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


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
  2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
                   ` (10 preceding siblings ...)
  2004-05-24 21:48 ` [Bug tree-optimization/14541] " pinskia at gcc dot gnu dot org
@ 2004-06-01  1:47 ` pinskia at gcc dot gnu dot org
  2004-06-21  5:15 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-01  1:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-01 01:47 -------
Ok, I just confirmed that my new patch for PR 15459 fixes this.

-- 


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


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
  2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
                   ` (11 preceding siblings ...)
  2004-06-01  1:47 ` pinskia at gcc dot gnu dot org
@ 2004-06-21  5:15 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-21  5:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-21 05:15 -------
Will submit my tree combiner pass which fixes this.

-- 


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


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
       [not found] <bug-14541-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2014-12-11 13:30 ` ktkachov at gcc dot gnu.org
@ 2014-12-15 13:11 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-15 13:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14541

--- Comment #24 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to ktkachov from comment #23)
> (In reply to Richard Biener from comment #22)
> > (In reply to ktkachov from comment #21)
> > > Created attachment 34215 [details]
> > > Link errors output for aarch64
> > > 
> > > > Which one exactly?  That is, what is the failing link output?
> > > 
> > > All of them AFAICS. I'm attaching the link failures log.
> > > 
> > > The test PASSes at -O2 -flto and -O2 -flto -flto-partition=none
> > > 
> > > but FAILs on all other torture options
> > 
> > With a cross to aarch64-linux and compiling with -O1+ -ffast-math the
> > result is as expected (optimized to empty functions).  How exactly
> > do you configure?  I used
> > 
> > /space/rguenther/src/svn/trunk2/configure --target=aarch64-suse-linux
> > --enable-languages=c,c++,fortran --enable-checking
> 
> Hmmm... My compiler is a bare-metal one: aarch64-none-elf (and I still see
> these failures).
> 
> With an aarch64-none-linux-gnu compiler the testcase works fine...

I have opened PR64313 for this regression.


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
       [not found] <bug-14541-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2014-12-11 13:14 ` rguenth at gcc dot gnu.org
@ 2014-12-11 13:30 ` ktkachov at gcc dot gnu.org
  2014-12-15 13:11 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 26+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-12-11 13:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14541

--- Comment #23 from ktkachov at gcc dot gnu.org ---
(In reply to Richard Biener from comment #22)
> (In reply to ktkachov from comment #21)
> > Created attachment 34215 [details]
> > Link errors output for aarch64
> > 
> > > Which one exactly?  That is, what is the failing link output?
> > 
> > All of them AFAICS. I'm attaching the link failures log.
> > 
> > The test PASSes at -O2 -flto and -O2 -flto -flto-partition=none
> > 
> > but FAILs on all other torture options
> 
> With a cross to aarch64-linux and compiling with -O1+ -ffast-math the
> result is as expected (optimized to empty functions).  How exactly
> do you configure?  I used
> 
> /space/rguenther/src/svn/trunk2/configure --target=aarch64-suse-linux
> --enable-languages=c,c++,fortran --enable-checking

Hmmm... My compiler is a bare-metal one: aarch64-none-elf (and I still see
these failures).

With an aarch64-none-linux-gnu compiler the testcase works fine...


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
       [not found] <bug-14541-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2014-12-08 10:32 ` rguenther at suse dot de
@ 2014-12-11 13:14 ` rguenth at gcc dot gnu.org
  2014-12-11 13:30 ` ktkachov at gcc dot gnu.org
  2014-12-15 13:11 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-11 13:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14541

--- Comment #22 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to ktkachov from comment #21)
> Created attachment 34215 [details]
> Link errors output for aarch64
> 
> > Which one exactly?  That is, what is the failing link output?
> 
> All of them AFAICS. I'm attaching the link failures log.
> 
> The test PASSes at -O2 -flto and -O2 -flto -flto-partition=none
> 
> but FAILs on all other torture options

With a cross to aarch64-linux and compiling with -O1+ -ffast-math the
result is as expected (optimized to empty functions).  How exactly
do you configure?  I used

/space/rguenther/src/svn/trunk2/configure --target=aarch64-suse-linux
--enable-languages=c,c++,fortran --enable-checking


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
       [not found] <bug-14541-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2014-12-08 10:28 ` ktkachov at gcc dot gnu.org
@ 2014-12-08 10:32 ` rguenther at suse dot de
  2014-12-11 13:14 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: rguenther at suse dot de @ 2014-12-08 10:32 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 3604 bytes --]

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14541

--- Comment #20 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 8 Dec 2014, ktkachov at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14541
> 
> ktkachov at gcc dot gnu.org changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |ktkachov at gcc dot gnu.org
> 
> --- Comment #19 from ktkachov at gcc dot gnu.org ---
> (In reply to Richard Biener from comment #18)
> > Author: rguenth
> > Date: Wed Dec  3 11:55:14 2014
> > New Revision: 218308
> > 
> > URL: https://gcc.gnu.org/viewcvs?rev=218308&root=gcc&view=rev
> > Log:
> > 2014-12-03  Richard Biener  <rguenther@suse.de>
> > 
> > 	PR middle-end/14541
> > 	* builtins.c (fold_builtin_logarithm): Implement simplifications ...
> > 	* match.pd: ... here as patterns.
> > 
> > Modified:
> >     trunk/gcc/ChangeLog
> >     trunk/gcc/builtins.c
> >     trunk/gcc/match.pd
> 
> With this commit the builtin-explog-1.c test stops folding the builtins on
> aarch64 (and consequently FAILs)

Which one exactly?  That is, what is the failing link output?
>From gcc-bugs-return-469705-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Dec 08 10:37:00 2014
Return-Path: <gcc-bugs-return-469705-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 26341 invoked by alias); 8 Dec 2014 10:37:00 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 26278 invoked by uid 48); 8 Dec 2014 10:36:56 -0000
From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
Date: Mon, 08 Dec 2014 10:37:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: tree-ssa
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: ktkachov at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-14541-4-cH13ukDQJ1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-14541-4@http.gcc.gnu.org/bugzilla/>
References: <bug-14541-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-12/txt/msg00712.txt.bz2
Content-length: 461

https://gcc.gnu.org/bugzilla/show_bug.cgi?id\x14541

--- Comment #21 from ktkachov at gcc dot gnu.org ---
Created attachment 34215
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id4215&actioníit
Link errors output for aarch64

> Which one exactly?  That is, what is the failing link output?

All of them AFAICS. I'm attaching the link failures log.

The test PASSes at -O2 -flto and -O2 -flto -flto-partition=none

but FAILs on all other torture options


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
       [not found] <bug-14541-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2014-12-03 11:55 ` rguenth at gcc dot gnu.org
@ 2014-12-08 10:28 ` ktkachov at gcc dot gnu.org
  2014-12-08 10:32 ` rguenther at suse dot de
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-12-08 10:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14541

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktkachov at gcc dot gnu.org

--- Comment #19 from ktkachov at gcc dot gnu.org ---
(In reply to Richard Biener from comment #18)
> Author: rguenth
> Date: Wed Dec  3 11:55:14 2014
> New Revision: 218308
> 
> URL: https://gcc.gnu.org/viewcvs?rev=218308&root=gcc&view=rev
> Log:
> 2014-12-03  Richard Biener  <rguenther@suse.de>
> 
> 	PR middle-end/14541
> 	* builtins.c (fold_builtin_logarithm): Implement simplifications ...
> 	* match.pd: ... here as patterns.
> 
> Modified:
>     trunk/gcc/ChangeLog
>     trunk/gcc/builtins.c
>     trunk/gcc/match.pd

With this commit the builtin-explog-1.c test stops folding the builtins on
aarch64 (and consequently FAILs)
>From gcc-bugs-return-469702-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Dec 08 10:28:56 2014
Return-Path: <gcc-bugs-return-469702-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19774 invoked by alias); 8 Dec 2014 10:28:55 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 19686 invoked by uid 48); 8 Dec 2014 10:28:51 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/64216] Function template can access private sub class without being friend
Date: Mon, 08 Dec 2014 10:28:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-64216-4-JZw4RSbAuC@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64216-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64216-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-12/txt/msg00709.txt.bz2
Content-length: 500

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd216

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Definitely a dup

*** This bug has been marked as a duplicate of bug 41437 ***


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
       [not found] <bug-14541-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-12-02 11:23 ` rguenth at gcc dot gnu.org
@ 2014-12-03 11:55 ` rguenth at gcc dot gnu.org
  2014-12-08 10:28 ` ktkachov at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-03 11:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14541

--- Comment #18 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Wed Dec  3 11:55:14 2014
New Revision: 218308

URL: https://gcc.gnu.org/viewcvs?rev=218308&root=gcc&view=rev
Log:
2014-12-03  Richard Biener  <rguenther@suse.de>

    PR middle-end/14541
    * builtins.c (fold_builtin_logarithm): Implement simplifications ...
    * match.pd: ... here as patterns.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/match.pd


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
       [not found] <bug-14541-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2014-12-01 14:15 ` rguenth at gcc dot gnu.org
@ 2014-12-02 11:23 ` rguenth at gcc dot gnu.org
  2014-12-03 11:55 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-02 11:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14541

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|pinskia at gcc dot gnu.org         |rguenth at gcc dot gnu.org

--- Comment #17 from Richard Biener <rguenth at gcc dot gnu.org> ---
I have a patch for fold_builtin_logarithm.  But as I understand this PR
basically asks for "everything".  A few more cases are already implemented on
the branch.


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
       [not found] <bug-14541-4@http.gcc.gnu.org/bugzilla/>
  2012-02-12  9:24 ` pinskia at gcc dot gnu.org
  2014-10-31  4:01 ` pinskia at gcc dot gnu.org
@ 2014-12-01 14:15 ` rguenth at gcc dot gnu.org
  2014-12-02 11:23 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-01 14:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14541

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
(for logfn (BUILT_IN_LOGF BUILT_IN_LOG BUILT_IN_LOGL)
     expfn (BUILT_IN_EXPF BUILT_IN_EXP BUILT_IN_EXPL)
 (simplify
  (logfn (expfn @0))
  (if (flag_unsafe_math_optimizations)
   @0)))

with the still somewhat awkward syntax, patch for proposed better one
is not yet ready but would look like

(define_operator_list log (BUILT_IN_LOGF BUILT_IN_LOG BUILT_IN_LOGL))
(define_operator_list exp (BUILT_IN_EXPF BUILT_IN_EXP BUILT_IN_EXPL))

(simplify
 (log (exp @0))
 (if (flag_unsafe_math_optimizations)
  @0)))

thus the 'for' would be implicit.  Note that fold_builtin_logarithm does handle
some more cases.  The match-and-simplify branch already covers quite some
patterns in match-builtins.def (but not the above).

I'll see if I can take the syntax patch (I was waiting for that so not to
merge the "ugly" syntax).


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
       [not found] <bug-14541-4@http.gcc.gnu.org/bugzilla/>
  2012-02-12  9:24 ` pinskia at gcc dot gnu.org
@ 2014-10-31  4:01 ` pinskia at gcc dot gnu.org
  2014-12-01 14:15 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-10-31  4:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14541
Bug 14541 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] 26+ messages in thread

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
       [not found] <bug-14541-4@http.gcc.gnu.org/bugzilla/>
@ 2012-02-12  9:24 ` pinskia at gcc dot gnu.org
  2014-10-31  4:01 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-12  9:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-12 09:23:28 UTC ---
I will implement this combing in forwprop (since that is where we are doing all
the combing optimizations now).


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
       [not found] <bug-14541-5009@http.gcc.gnu.org/bugzilla/>
@ 2006-11-26  8:15 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-26  8:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from pinskia at gcc dot gnu dot org  2006-11-26 08:15 -------
*** Bug 29985 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ubizjak at gmail dot com


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


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

* [Bug tree-optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level
       [not found] <20040312001701.14541.kazu@gcc.gnu.org>
@ 2005-07-12 21:26 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-12 21:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-12 21:26 -------
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=14541


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

end of thread, other threads:[~2014-12-15 13:11 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-12  0:17 [Bug optimization/14541] New: [tree-ssa] gcc.dg/torture/builtin-explog-1.c fails kazu at cs dot umass dot edu
2004-03-12  0:18 ` [Bug optimization/14541] " kazu at cs dot umass dot edu
2004-03-12  0:26 ` pinskia at gcc dot gnu dot org
2004-03-12  2:40 ` [Bug optimization/14541] [tree-ssa] built-in math functions are not fully optimized at tree level kazu at cs dot umass dot edu
2004-03-12 15:30 ` amacleod at redhat dot com
2004-03-25  0:09 ` bje at gcc dot gnu dot org
2004-05-03 12:37 ` pinskia at gcc dot gnu dot org
2004-05-04  7:56 ` kazu at cs dot umass dot edu
2004-05-04 11:32 ` pinskia at gcc dot gnu dot org
2004-05-04 15:52 ` kazu at cs dot umass dot edu
2004-05-04 15:57 ` pinskia at gcc dot gnu dot org
2004-05-24 21:48 ` [Bug tree-optimization/14541] " pinskia at gcc dot gnu dot org
2004-06-01  1:47 ` pinskia at gcc dot gnu dot org
2004-06-21  5:15 ` pinskia at gcc dot gnu dot org
     [not found] <20040312001701.14541.kazu@gcc.gnu.org>
2005-07-12 21:26 ` pinskia at gcc dot gnu dot org
     [not found] <bug-14541-5009@http.gcc.gnu.org/bugzilla/>
2006-11-26  8:15 ` pinskia at gcc dot gnu dot org
     [not found] <bug-14541-4@http.gcc.gnu.org/bugzilla/>
2012-02-12  9:24 ` pinskia at gcc dot gnu.org
2014-10-31  4:01 ` pinskia at gcc dot gnu.org
2014-12-01 14:15 ` rguenth at gcc dot gnu.org
2014-12-02 11:23 ` rguenth at gcc dot gnu.org
2014-12-03 11:55 ` rguenth at gcc dot gnu.org
2014-12-08 10:28 ` ktkachov at gcc dot gnu.org
2014-12-08 10:32 ` rguenther at suse dot de
2014-12-11 13:14 ` rguenth at gcc dot gnu.org
2014-12-11 13:30 ` ktkachov at gcc dot gnu.org
2014-12-15 13:11 ` rguenth 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).