[ARM] arm memcpy of aligned data
2015-08-17 Mike Stump <mikestump@comcast.net> * config/arm/arm.c (arm_block_move_unaligned_straight): Emit normal move instead of unaligned load when source or destination are appropriately aligned. 2015-08-17 Mike Stump <mikestump@comcast.net> Kyrylo Tkachov <kyrylo.tkachov@arm.com> * gcc.target/arm/memcpy-aligned-1.c: New test. Co-Authored-By: Kyrylo Tkachov <kyrylo.tkachov@arm.com> From-SVN: r226935
This commit is contained in:
parent
d202f9bdb4
commit
48efbbe8a0
4 changed files with 31 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2015-08-17 Mike Stump <mikestump@comcast.net>
|
||||
|
||||
* config/arm/arm.c (arm_block_move_unaligned_straight):
|
||||
Emit normal move instead of unaligned load when source or destination
|
||||
are appropriately aligned.
|
||||
|
||||
2015-08-17 Richard Biener <rguenther@suse.de>
|
||||
Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
|
||||
|
||||
|
|
|
@ -14412,7 +14412,10 @@ arm_block_move_unaligned_straight (rtx dstbase, rtx srcbase,
|
|||
srcoffset + j * UNITS_PER_WORD - src_autoinc);
|
||||
mem = adjust_automodify_address (srcbase, SImode, addr,
|
||||
srcoffset + j * UNITS_PER_WORD);
|
||||
emit_insn (gen_unaligned_loadsi (regs[j], mem));
|
||||
if (src_aligned)
|
||||
emit_move_insn (regs[j], mem);
|
||||
else
|
||||
emit_insn (gen_unaligned_loadsi (regs[j], mem));
|
||||
}
|
||||
srcoffset += words * UNITS_PER_WORD;
|
||||
}
|
||||
|
@ -14431,7 +14434,10 @@ arm_block_move_unaligned_straight (rtx dstbase, rtx srcbase,
|
|||
dstoffset + j * UNITS_PER_WORD - dst_autoinc);
|
||||
mem = adjust_automodify_address (dstbase, SImode, addr,
|
||||
dstoffset + j * UNITS_PER_WORD);
|
||||
emit_insn (gen_unaligned_storesi (mem, regs[j]));
|
||||
if (dst_aligned)
|
||||
emit_move_insn (mem, regs[j]);
|
||||
else
|
||||
emit_insn (gen_unaligned_storesi (mem, regs[j]));
|
||||
}
|
||||
dstoffset += words * UNITS_PER_WORD;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2015-08-17 Mike Stump <mikestump@comcast.net>
|
||||
Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
* gcc.target/arm/memcpy-aligned-1.c: New test.
|
||||
|
||||
2015-08-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||
|
||||
PR fortran/54656
|
||||
|
|
12
gcc/testsuite/gcc.target/arm/memcpy-aligned-1.c
Normal file
12
gcc/testsuite/gcc.target/arm/memcpy-aligned-1.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -save-temps" } */
|
||||
|
||||
void *memcpy (void *dest, const void *src, unsigned int n);
|
||||
|
||||
void foo (char *dst, int i)
|
||||
{
|
||||
memcpy (dst, &i, sizeof (i));
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "str\t" 1 } } */
|
||||
/* { dg-final { scan-assembler-not "ldr\t" } } */
|
Loading…
Add table
Reference in a new issue