public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/64896] New: [5 Regression] ICE in get_address_mode, at rtlanal.c:5442
@ 2015-02-01 19:40 trippels at gcc dot gnu.org
  2015-02-02  8:46 ` [Bug ipa/64896] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-02-01 19:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64896
           Summary: [5 Regression] ICE in get_address_mode, at
                    rtlanal.c:5442
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
                CC: marxin at gcc dot gnu.org

qtwebkit-5.4 fails to build:

 % g++ -c -w -O2 -std=c++0x -march=amdfam10 SVGAllInOne.ii
svg/SVGSVGElement.cpp: In member function ‘WebCore::FloatRect
WebCore::SVGSVGElement::viewport() const’:
svg/SVGSVGElement.cpp:60:5443: internal compiler error: in get_address_mode, at
rtlanal.c:5442
0xc411f1 get_address_mode(rtx_def*)
        ../../gcc/gcc/rtlanal.c:5442
0x98fb82 adjust_address_1(rtx_def*, machine_mode, long, int, int, int, long)
        ../../gcc/gcc/emit-rtl.c:2227
0x9c600f store_field
        ../../gcc/gcc/expr.c:6715
0x9cbbc0 expand_assignment(tree_node*, tree_node*, bool)
        ../../gcc/gcc/expr.c:5000
0x8cda6e expand_gimple_stmt_1
        ../../gcc/gcc/cfgexpand.c:3385
0x8cda6e expand_gimple_stmt
        ../../gcc/gcc/cfgexpand.c:3481
0x8d4807 expand_gimple_basic_block
        ../../gcc/gcc/cfgexpand.c:5397
0x8d6027 execute
        ../../gcc/gcc/cfgexpand.c:6006
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Adding -fno-ipa-icf fixes the issue. The testcase is very large: ~10MB.
Reduced testcase should be ready tomorrow.
>From gcc-bugs-return-475723-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Feb 01 19:46:05 2015
Return-Path: <gcc-bugs-return-475723-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 3858 invoked by alias); 1 Feb 2015 19:46:05 -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 3837 invoked by uid 48); 1 Feb 2015 19:46:02 -0000
From: "schnetter at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/64897] New: Floating-point "and" not optimized on x86-64
Date: Sun, 01 Feb 2015 19:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: schnetter at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
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_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-64897-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: 2015-02/txt/msg00056.txt.bz2
Content-length: 1322

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

            Bug ID: 64897
           Summary: Floating-point "and" not optimized on x86-64
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: schnetter at gmail dot com

I notice that gcc does not generate "vandpd" for floating-point "and"
operations. Here is an example code that demonstrates this:
{{{
#include <math.h>
#include <string.h>
double fand1(double x)
{
  unsigned long ix;
  memcpy(&ix, &x, 8);
  ix &= 0x7fffffffffffffffUL;
  memcpy(&x, &ix, 8);
  return x;
}
double fand2(double x)
{
  return fabs(x);
}
}}}

When I compile this via:
{{{
gcc-mp-4.9 -O3 -march=native -S fand.c -o fand-gcc-4.9.s
}}}
(OS X, x86-64 CPU, Intel Core i7), this results in:
{{{
_fand1:
    movabsq    $9223372036854775807, %rax
    vmovd    %xmm0, %rdx
    andq    %rdx, %rax
    vmovd    %rax, %xmm0
    ret
_fand2:
    vmovsd    LC1(%rip), %xmm1
    vandpd    %xmm1, %xmm0, %xmm0
    ret
}}}

This shows that (a) gcc performs the bitwise and operation in an integer
register, which is probably slower, and (b) the implementors of "fabs" assume
that using the "vandpd" instruction is faster.


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

end of thread, other threads:[~2015-03-08 20:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-01 19:40 [Bug ipa/64896] New: [5 Regression] ICE in get_address_mode, at rtlanal.c:5442 trippels at gcc dot gnu.org
2015-02-02  8:46 ` [Bug ipa/64896] " rguenth at gcc dot gnu.org
2015-02-02 11:52 ` trippels at gcc dot gnu.org
2015-02-02 15:00 ` jakub at gcc dot gnu.org
2015-02-02 15:59 ` trippels at gcc dot gnu.org
2015-02-02 18:11 ` hubicka at gcc dot gnu.org
2015-02-04 23:21 ` hubicka at gcc dot gnu.org
2015-02-06 12:50 ` jakub at gcc dot gnu.org
2015-02-06 17:22 ` hubicka at gcc dot gnu.org
2015-02-06 20:47 ` jakub at gcc dot gnu.org
2015-02-06 20:50 ` jakub at gcc dot gnu.org
2015-03-08 20:40 ` yroux 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).