[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-06-01 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 Tobias Burnus burnus at gcc dot gnu.org changed: What|Removed |Added Status|REOPENED|RESOLVED

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-05-31 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 Thomas Koenig tkoenig at gcc dot gnu.org changed: What|Removed |Added Status|RESOLVED|REOPENED

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-05-31 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 --- Comment #15 from Tobias Burnus burnus at gcc dot gnu.org --- (In reply to Thomas Koenig from comment #14) The patch at http://gcc.gnu.org/ml/gcc-cvs/2013-05/msg01050.html is wrong I realized this myself about 6 hours ago, see

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-05-30 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 --- Comment #11 from Thomas Koenig tkoenig at gcc dot gnu.org --- Created attachment 30228 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30228action=edit Yet another patch that doesn't work This one fails with program main ^ _24 = i_1 1;

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-05-30 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 --- Comment #12 from Tobias Burnus burnus at gcc dot gnu.org --- Author: burnus Date: Thu May 30 21:32:53 2013 New Revision: 199461 URL: http://gcc.gnu.org/viewcvs?rev=199461root=gccview=rev Log: 2013-05-30 Tobias Burnus bur...@net-b.de

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-05-30 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 Tobias Burnus burnus at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-05-17 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 --- Comment #10 from Thomas Koenig tkoenig at gcc dot gnu.org --- Created attachment 30142 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30142action=edit Another patch that doesn't work... This time with the right PR... I tried to follow

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-05-03 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 --- Comment #9 from Tobias Burnus burnus at gcc dot gnu.org 2013-05-03 09:58:20 UTC --- After some discussion with Jakub and Richard - and after doing some code reads, I think it is best do handle this in tree-ssa-math-opts.c (search for

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-05-02 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 Thomas Koenig tkoenig at gcc dot gnu.org changed: What|Removed |Added Attachment #29968|0 |1

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-05-02 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 --- Comment #7 from Tobias Burnus burnus at gcc dot gnu.org 2013-05-02 21:08:36 UTC --- The problem is the following in gimplify.c: In gimplify_cond_expr, one has: /* If this COND_EXPR has a value, copy the values into a temporary

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-05-02 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 --- Comment #8 from Tobias Burnus burnus at gcc dot gnu.org 2013-05-02 22:00:53 UTC --- For completeness, gimplify_ctxp-into_ssa is 0 for the -O0 optimization and it gets set to 1 in gimple_regimplify_operands. Thus, it is not surprising

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-04-29 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 --- Comment #5 from Tobias Burnus burnus at gcc dot gnu.org 2013-04-29 08:40:59 UTC --- (In reply to comment #4) patch that fails The Fortran patch of the attachments looks fine, except for: + one = gfc_copy_expr (op1); +

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-04-28 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 --- Comment #3 from Thomas Koenig tkoenig at gcc dot gnu.org 2013-04-28 09:05:31 UTC --- (In reply to comment #1) Modulo is an integer only operation, so I'd say you want (k 1) ? -1.0 : 1.0 instead, converting (k 1) into floating

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-04-28 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 --- Comment #4 from Thomas Koenig tkoenig at gcc dot gnu.org 2013-04-28 22:03:35 UTC --- Created attachment 29968 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29968 patch that fails The patch in the attachment fails with the test

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-04-26 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added CC||jakub at

[Bug middle-end/57073] __builtin_powif (-1.0, k) should be optimized to 1.0 - 2.0 * (K%2)

2013-04-26 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073 Tobias Burnus burnus at gcc dot gnu.org changed: What|Removed |Added CC||burnus