public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/59175] New: gcc.target/i386/memcpy-2.c fails with -m32
@ 2013-11-18 17:44 hjl.tools at gmail dot com
  2013-11-18 21:45 ` [Bug middle-end/59175] " ubizjak at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-18 17:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59175
           Summary: gcc.target/i386/memcpy-2.c fails with -m32
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: hubicka at gcc dot gnu.org

On x86, gcc.target/i386/memcpy-2.c fails with -m32
With -m64, we got

[hjl@gnu-6 good]$ cat x.i.015t.ssa

;; Function t (t, funcdef_no=0, decl_uid=1792, symbol_order=2)

t (unsigned int c)
{
  long unsigned int _4;
  void * b.0_5;
  void * a.1_6;

  <bb 2>:
  if (c_2(D) <= 9)
    goto <bb 3>;
  else
    goto <bb 4>;

  <bb 3>:
  _4 = (long unsigned int) c_2(D);
  b.0_5 = b;
  a.1_6 = a;
  memcpy (a.1_6, b.0_5, _4);

  <bb 4>:
  return;

}


[hjl@gnu-6 good]$ 

With -m32, we got

[hjl@gnu-6 bad]$ cat x.i.015t.ssa

;; Function t (t, funcdef_no=0, decl_uid=1763, symbol_order=2)

t (unsigned int c)
{
  void * b.0_4;
  void * a.1_5;

  <bb 2>:
  if (c_2(D) <= 9)
    goto <bb 3>;
  else
    goto <bb 4>;

  <bb 3>:
  b.0_4 = b;
  a.1_5 = a;
  memcpy (a.1_5, b.0_4, c_2(D));

  <bb 4>:
  return;

}


[hjl@gnu-6 bad]$ 

get_range_info returns VR_VARYING on c_2(D), but VR_RANGE
on _4.


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

* [Bug middle-end/59175] gcc.target/i386/memcpy-2.c fails with -m32
  2013-11-18 17:44 [Bug middle-end/59175] New: gcc.target/i386/memcpy-2.c fails with -m32 hjl.tools at gmail dot com
@ 2013-11-18 21:45 ` ubizjak at gmail dot com
  2013-11-19  1:12 ` hubicka at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2013-11-18 21:45 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

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

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 31241
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31241&action=edit
Fixed testcase

I have fixed the testcase to not fail due to missing memcpy prototype and to
not fail scan-assembler-not dg-directive, since filename matches the pattern.

It still fails -m32 compilation due to the problem, described in Comment #0.
>From gcc-bugs-return-434945-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 18 22:09:42 2013
Return-Path: <gcc-bugs-return-434945-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25037 invoked by alias); 18 Nov 2013 22:09:42 -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 25006 invoked by uid 48); 18 Nov 2013 22:09:37 -0000
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug inline-asm/59180] New: x87 constraint "+tg" worse that "+tm" or "+t"
Date: Mon, 18 Nov 2013 22:09:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: inline-asm
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: glisse at gcc dot gnu.org
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 cf_gcctarget
Message-ID: <bug-59180-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: 2013-11/txt/msg01722.txt.bz2
Content-length: 1231

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY180

            Bug ID: 59180
           Summary: x87 constraint "+tg" worse that "+tm" or "+t"
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: inline-asm
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glisse at gcc dot gnu.org
            Target: x86_64-linux-gnu

static double f(double x){asm volatile("":"+tg"(x));return x;}
double g(double a,double b,double c){
  return f(f(a)+f(f(b)*f(c)));
}

compiled with -O3 -m32:

    .cfi_startproc
    subl    $28, %esp
    .cfi_def_cfa_offset 32
    fldl    32(%esp)
    fstpl    (%esp)
    fldl    40(%esp)
    fstpl    8(%esp)
    fldl    48(%esp)
    fstpl    16(%esp)
    fldl    8(%esp)
    fmull    16(%esp)
    fstpl    8(%esp)
    fldl    (%esp)
    faddl    8(%esp)
    fstpl    (%esp)
    fldl    (%esp)
    addl    $28, %esp
    .cfi_def_cfa_offset 4
    ret
    .cfi_endproc

If I give it only "+t" or "+tm", it generates the much better:

    .cfi_startproc
    fldl    4(%esp)
    fldl    12(%esp)
    fldl    20(%esp)
    fmulp    %st, %st(1)
    faddp    %st, %st(1)
    ret
    .cfi_endproc


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

* [Bug middle-end/59175] gcc.target/i386/memcpy-2.c fails with -m32
  2013-11-18 17:44 [Bug middle-end/59175] New: gcc.target/i386/memcpy-2.c fails with -m32 hjl.tools at gmail dot com
  2013-11-18 21:45 ` [Bug middle-end/59175] " ubizjak at gmail dot com
@ 2013-11-19  1:12 ` hubicka at gcc dot gnu.org
  2013-11-19  1:30 ` hubicka at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-11-19  1:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Hmm, we lose information here since we remove the range expression.  I suppose
that problem should be handled independently.  I will update the testcase to
new template and add +1 that will introduce new SSA name to add value range
info to.

Honza


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

* [Bug middle-end/59175] gcc.target/i386/memcpy-2.c fails with -m32
  2013-11-18 17:44 [Bug middle-end/59175] New: gcc.target/i386/memcpy-2.c fails with -m32 hjl.tools at gmail dot com
  2013-11-18 21:45 ` [Bug middle-end/59175] " ubizjak at gmail dot com
  2013-11-19  1:12 ` hubicka at gcc dot gnu.org
@ 2013-11-19  1:30 ` hubicka at gcc dot gnu.org
  2013-11-19  9:16 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-11-19  1:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Author: hubicka
Date: Tue Nov 19 01:30:51 2013
New Revision: 204996

URL: http://gcc.gnu.org/viewcvs?rev=204996&root=gcc&view=rev
Log:
    PR middle-end/59175
    * gcc.target/i386/memcpy-2.c: Fix template;
    add +1 so the testcase passes at 32bit.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/i386/memcpy-2.c


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

* [Bug middle-end/59175] gcc.target/i386/memcpy-2.c fails with -m32
  2013-11-18 17:44 [Bug middle-end/59175] New: gcc.target/i386/memcpy-2.c fails with -m32 hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2013-11-19  1:30 ` hubicka at gcc dot gnu.org
@ 2013-11-19  9:16 ` rguenth at gcc dot gnu.org
  2013-11-19 14:05 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-19  9:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed I suppose.


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

* [Bug middle-end/59175] gcc.target/i386/memcpy-2.c fails with -m32
  2013-11-18 17:44 [Bug middle-end/59175] New: gcc.target/i386/memcpy-2.c fails with -m32 hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2013-11-19  9:16 ` rguenth at gcc dot gnu.org
@ 2013-11-19 14:05 ` hjl.tools at gmail dot com
  2013-11-19 14:38 ` ubizjak at gmail dot com
  2013-11-19 14:58 ` hjl.tools at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-19 14:05 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2013-11-19
         Resolution|FIXED                       |---
     Ever confirmed|0                           |1

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
It failed when gcc is configured with --with-arch=core2 --with-cpu=atom.
It can be reproduced with -mtune=atom.


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

* [Bug middle-end/59175] gcc.target/i386/memcpy-2.c fails with -m32
  2013-11-18 17:44 [Bug middle-end/59175] New: gcc.target/i386/memcpy-2.c fails with -m32 hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2013-11-19 14:05 ` hjl.tools at gmail dot com
@ 2013-11-19 14:38 ` ubizjak at gmail dot com
  2013-11-19 14:58 ` hjl.tools at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2013-11-19 14:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to H.J. Lu from comment #5)
> It failed when gcc is configured with --with-arch=core2 --with-cpu=atom.
> It can be reproduced with -mtune=atom.

Probably -mtune=generic is needed in options.
>From gcc-bugs-return-435064-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Nov 19 14:44:57 2013
Return-Path: <gcc-bugs-return-435064-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 13415 invoked by alias); 19 Nov 2013 14:44:57 -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 13359 invoked by uid 48); 19 Nov 2013 14:44:54 -0000
From: "kcc at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/59188] [4.9 Regression] lib64/libtsan.so: undefined reference to `sigsetjmp'
Date: Tue, 19 Nov 2013 14:44:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: sanitizer
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: kcc at gcc dot gnu.org
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:
Message-ID: <bug-59188-4-VfAFyDuowX@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59188-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59188-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: 2013-11/txt/msg01841.txt.bz2
Content-length: 357

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY188

--- Comment #1 from Kostya Serebryany <kcc at gcc dot gnu.org> ---
Interesting. tsan in clang works, so we either have problems in the
gcc build system or we have some differences in the code that affect the
sigsetjmp interceptor.

one other problem would be that we have zero tests for tsan in gcc :(


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

* [Bug middle-end/59175] gcc.target/i386/memcpy-2.c fails with -m32
  2013-11-18 17:44 [Bug middle-end/59175] New: gcc.target/i386/memcpy-2.c fails with -m32 hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2013-11-19 14:38 ` ubizjak at gmail dot com
@ 2013-11-19 14:58 ` hjl.tools at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-19 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |areg.melikadamyan at gmail dot com

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Uroš Bizjak from comment #6)
> (In reply to H.J. Lu from comment #5)
> > It failed when gcc is configured with --with-arch=core2 --with-cpu=atom.
> > It can be reproduced with -mtune=atom.
> 
> Probably -mtune=generic is needed in options.

The same thing happens with -mtune=slm. Shouldn't it also benefit
Silvermont?
>From gcc-bugs-return-435072-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Nov 19 15:01:37 2013
Return-Path: <gcc-bugs-return-435072-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 4004 invoked by alias); 19 Nov 2013 15:01:37 -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 2285 invoked by uid 55); 19 Nov 2013 15:00:14 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/59164] [4.7/4.8/4.9 Regression] ice: tree check:=?UTF-8?Q? expected tree that contains ‘decl minimal’ structure?=,=?UTF-8?Q? have ‘integer_cst’ in get_var_info?=, at tree-into-ssa.c:380
Date: Tue, 19 Nov 2013 15:01: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: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.7.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-59164-4-CBA39T3GFQ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59164-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59164-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: 2013-11/txt/msg01849.txt.bz2
Content-length: 819

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY164

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Tue Nov 19 15:00:10 2013
New Revision: 205030

URL: http://gcc.gnu.org/viewcvs?rev 5030&root=gcc&view=rev
Log:
2013-11-19  Richard Biener  <rguenther@suse.de>

    PR tree-optimization/59164
    * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer):
    Uncomment assert.
    * tree-vect-loop.c (vect_analyze_loop_operations): Adjust
    check whether we can create an epilogue loop to reflect the
    cases where we create one.

    * gcc.dg/torture/pr59164.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr59164.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-loop-manip.c
    trunk/gcc/tree-vect-loop.c


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

end of thread, other threads:[~2013-11-19 14:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-18 17:44 [Bug middle-end/59175] New: gcc.target/i386/memcpy-2.c fails with -m32 hjl.tools at gmail dot com
2013-11-18 21:45 ` [Bug middle-end/59175] " ubizjak at gmail dot com
2013-11-19  1:12 ` hubicka at gcc dot gnu.org
2013-11-19  1:30 ` hubicka at gcc dot gnu.org
2013-11-19  9:16 ` rguenth at gcc dot gnu.org
2013-11-19 14:05 ` hjl.tools at gmail dot com
2013-11-19 14:38 ` ubizjak at gmail dot com
2013-11-19 14:58 ` hjl.tools at gmail dot com

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).