This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/32951] missed memcpy -> movdqa optimization.
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jul 2007 18:46:46 -0000
- Subject: [Bug target/32951] missed memcpy -> movdqa optimization.
- References: <bug-32951-7667@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-07-31 18:46 -------
(insn 7 6 8 t.c:15 (set (reg:DI 61)
(mem:DI (reg/v/f:DI 59 [ buf ]) [0 S8 A8])) -1 (nil))
See A8.
So the aligned attribute so not applying where you think it should be.
This is how you get the correct aligned attribute:
typedef char a __attribute__((aligned(16)));
typedef a const* aligned_byte_buffer;
And then after that memcpy is not using the vector registers:
(insn 7 6 8 t.c:17 (set (reg:DI 61)
(mem:DI (reg/v/f:DI 59 [ buf ]) [0 S8 A128])) -1 (nil))
(insn 8 7 9 t.c:17 (set (mem/c/i:DI (reg:DI 60) [0 m+0 S8 A128])
(reg:DI 61)) -1 (nil))
(insn 9 8 10 t.c:17 (set (reg:DI 62)
(mem:DI (plus:DI (reg/v/f:DI 59 [ buf ])
(const_int 8 [0x8])) [0 S8 A64])) -1 (nil))
(insn 10 9 0 t.c:17 (set (mem/c/i:DI (plus:DI (reg:DI 60)
(const_int 8 [0x8])) [0 m+8 S8 A64])
(reg:DI 62)) -1 (nil))
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-07-31 18:46:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32951