public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/49699] New: Aligned load on unaligned address
@ 2011-07-11 1:27 hjl.tools at gmail dot com
2011-07-11 3:13 ` [Bug middle-end/49699] " hjl.tools at gmail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-11 1:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49699
Summary: Aligned load on unaligned address
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
CC: ubizjak@gmail.com
[hjl@gnu-6 tmp]$ cat a.c
#include <emmintrin.h>
struct foo
{
__m128 x;
} __attribute__ ((aligned(8)));
extern struct foo x;
__m128
foo ()
{
return x.x;
}
[hjl@gnu-6 tmp]$ gcc -msse2 -O a.c -S
[hjl@gnu-6 tmp]$ cat a.s
.file "a.c"
.text
.globl foo
.type foo, @function
foo:
.LFB516:
.cfi_startproc
movaps x(%rip), %xmm0
ret
.cfi_endproc
.LFE516:
.size foo, .-foo
.ident "GCC: (GNU) 4.6.0 20110530 (Red Hat 4.6.0-9)"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-6 tmp]$
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/49699] Aligned load on unaligned address
2011-07-11 1:27 [Bug target/49699] New: Aligned load on unaligned address hjl.tools at gmail dot com
@ 2011-07-11 3:13 ` hjl.tools at gmail dot com
2011-07-11 9:25 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-11 3:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49699
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|target |middle-end
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-11 03:13:16 UTC ---
It looks like a middle-end bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/49699] Aligned load on unaligned address
2011-07-11 1:27 [Bug target/49699] New: Aligned load on unaligned address hjl.tools at gmail dot com
2011-07-11 3:13 ` [Bug middle-end/49699] " hjl.tools at gmail dot com
@ 2011-07-11 9:25 ` rguenth at gcc dot gnu.org
2011-07-11 9:47 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-07-11 9:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49699
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.07.11 09:24:48
Ever Confirmed|0 |1
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-11 09:24:48 UTC ---
Confirmed.
The issue is that alignment info in FIELD_DECLs is "broken". I think that
in this case get_inner_reference simply chooses to tell the caller that
V4SF mode is to be used for the access and that's all it gets.
Very old issue. The aligned attribute cannot be reliably used to decrease
alignment.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/49699] Aligned load on unaligned address
2011-07-11 1:27 [Bug target/49699] New: Aligned load on unaligned address hjl.tools at gmail dot com
2011-07-11 3:13 ` [Bug middle-end/49699] " hjl.tools at gmail dot com
2011-07-11 9:25 ` rguenth at gcc dot gnu.org
@ 2011-07-11 9:47 ` jakub at gcc dot gnu.org
2011-07-12 14:05 ` hjl.tools at gmail dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-11 9:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49699
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-11 09:47:27 UTC ---
I think you'd need to make it packed as well, but then it depends on gcc
version which alignment the aggregate actually has.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/49699] Aligned load on unaligned address
2011-07-11 1:27 [Bug target/49699] New: Aligned load on unaligned address hjl.tools at gmail dot com
` (2 preceding siblings ...)
2011-07-11 9:47 ` jakub at gcc dot gnu.org
@ 2011-07-12 14:05 ` hjl.tools at gmail dot com
2011-07-12 14:06 ` hjl.tools at gmail dot com
2021-09-02 5:11 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-12 14:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49699
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-12 14:05:08 UTC ---
(In reply to comment #2)
>
> Very old issue. The aligned attribute cannot be reliably used to decrease
> alignment.
Can we issue a warning for things like this?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/49699] Aligned load on unaligned address
2011-07-11 1:27 [Bug target/49699] New: Aligned load on unaligned address hjl.tools at gmail dot com
` (3 preceding siblings ...)
2011-07-12 14:05 ` hjl.tools at gmail dot com
@ 2011-07-12 14:06 ` hjl.tools at gmail dot com
2021-09-02 5:11 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-12 14:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49699
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-12 14:06:08 UTC ---
(In reply to comment #3)
> I think you'd need to make it packed as well, but then it depends on gcc
> version which alignment the aggregate actually has.
This issue came from
http://sourceware.org/bugzilla/show_bug.cgi?id=12872
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/49699] Aligned load on unaligned address
2011-07-11 1:27 [Bug target/49699] New: Aligned load on unaligned address hjl.tools at gmail dot com
` (4 preceding siblings ...)
2011-07-12 14:06 ` hjl.tools at gmail dot com
@ 2021-09-02 5:11 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-02 5:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49699
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2011-07-11 09:24:48 |2021-9-1
Keywords| |wrong-code
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What is interesting is clang gets it wrong too.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-09-02 5:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-11 1:27 [Bug target/49699] New: Aligned load on unaligned address hjl.tools at gmail dot com
2011-07-11 3:13 ` [Bug middle-end/49699] " hjl.tools at gmail dot com
2011-07-11 9:25 ` rguenth at gcc dot gnu.org
2011-07-11 9:47 ` jakub at gcc dot gnu.org
2011-07-12 14:05 ` hjl.tools at gmail dot com
2011-07-12 14:06 ` hjl.tools at gmail dot com
2021-09-02 5:11 ` pinskia 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).