+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>
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;
}
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;
}
+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
--- /dev/null
+/* { 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" } } */