public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/59679] gcc version 4.7.3 and gcc version 4.5.3 cause an unaligned access exception on NetBSD/Alpha
Date: Tue, 28 Jan 2014 18:25:00 -0000	[thread overview]
Message-ID: <bug-59679-4-hz2sFLINvV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-59679-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tree-optimization           |middle-end

--- Comment #15 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #13)
> Confirmed as tree-optimization problem on 4.9 branch.

Actually, a middle-end problem, if at all. With -ftree-ter, expand creates a
couple of unaligned loads to arg0:

(insn 101 100 102 (set (reg:SI 150)
        (mem:SI (reg/v/f:DI 115 [ arg0 ]) [0  S4 A8])) scope-reduced.c:60 -1
     (nil))
...
(insn 105 104 106 17 (set (mem:SI (reg/v/f:DI 115 [ arg0 ]) [0  S4 A8])
        (reg:SI 151)) scope-reduced.c:60 -1
     (nil))
>From gcc-bugs-return-441787-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jan 28 18:26:37 2014
Return-Path: <gcc-bugs-return-441787-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 832 invoked by alias); 28 Jan 2014 18:26:36 -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 779 invoked by uid 48); 28 Jan 2014 18:26:33 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/59679] gcc version 4.7.3 and gcc version 4.5.3 cause an unaligned access exception on NetBSD/Alpha
Date: Tue, 28 Jan 2014 18:26:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.7.3
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.7.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-59679-4-V7XmHSOnuU@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59679-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59679-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-01/txt/msg02929.txt.bz2
Content-length: 417

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

--- Comment #16 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #15)
> (In reply to Uroš Bizjak from comment #13)
> > Confirmed as tree-optimization problem on 4.9 branch.
> 
> Actually, a middle-end problem, if at all. With -ftree-ter, expand creates a
> couple of unaligned loads to arg0:

s/loads/moves/
>From gcc-bugs-return-441788-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jan 28 18:31:08 2014
Return-Path: <gcc-bugs-return-441788-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 3903 invoked by alias); 28 Jan 2014 18:31:07 -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 3869 invoked by uid 48); 28 Jan 2014 18:31:04 -0000
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/59968] Unused BT patterns
Date: Tue, 28 Jan 2014 18:31:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: hjl.tools at gmail dot com
X-Bugzilla-Status: NEW
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-59968-4-0RfBUQ1I5Z@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59968-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59968-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-01/txt/msg02930.txt.bz2
Content-length: 874

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

--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> ---
For

int bar1;
void
__attribute__((noinline))
foo1 (int y)
{
  int z;
  if (!(bar1 & (1 << y)))
    xxx1 ();
  z = bar1 & (1 << y);
  bar1 |= 1 << y;
  bar1 &= ~z;
}

we generate

    movl    bar1(%rip), %edx
    pushq    %rbx
    .cfi_def_cfa_offset 16
    .cfi_offset 3, -16
    movl    %edi, %ebx
    btl    %edi, %edx
    jc    .L3
    call    xxx1
    movl    bar1(%rip), %edx
.L3:
    movl    %ebx, %ecx
    movl    $1, %eax
    sall    %cl, %eax
    movl    %edx, %ecx
    andl    %eax, %ecx
    orl    %edx, %eax
    notl    %ecx
    andl    %ecx, %eax
    movl    %eax, bar1(%rip)
    popq    %rbx
    .cfi_def_cfa_offset 8
    ret

I expect

    btc %edi, bar2(%rip)
    jc .L7
    jmp    xxx2
.L8:
    .p2align 4,,10
    .p2align 3
.L7:
    rep ret


  parent reply	other threads:[~2014-01-28 18:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-05  1:57 [Bug c/59679] New: " nullnilaki at gmail dot com
2014-01-05 20:57 ` [Bug target/59679] " nullnilaki at gmail dot com
2014-01-05 20:57 ` nullnilaki at gmail dot com
2014-01-05 21:02 ` nullnilaki at gmail dot com
2014-01-05 23:08 ` pinskia at gcc dot gnu.org
2014-01-06 16:01 ` nullnilaki at gmail dot com
2014-01-06 16:32 ` nullnilaki at gmail dot com
2014-01-06 16:56 ` nullnilaki at gmail dot com
2014-01-06 16:57 ` nullnilaki at gmail dot com
2014-01-26 22:56 ` mcree at orcon dot net.nz
2014-01-26 23:00 ` mcree at orcon dot net.nz
2014-01-26 23:01 ` mcree at orcon dot net.nz
2014-01-28 16:54 ` [Bug tree-optimization/59679] " ubizjak at gmail dot com
2014-01-28 17:17 ` ubizjak at gmail dot com
2014-01-28 18:25 ` ubizjak at gmail dot com [this message]
2014-01-29 16:39 ` [Bug middle-end/59679] " ubizjak at gmail dot com
2014-06-12 13:53 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-59679-4-hz2sFLINvV@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).