Commit 6b60ee20 by Martin Liska Committed by Martin Liska

Add test for memcpy expansion with hint.

2018-08-27  Martin Liska  <mliska@suse.cz>

	* config/i386/i386.c (ix86_expand_set_or_movmem): Dump
        selected expansion strategy.
2018-08-27  Martin Liska  <mliska@suse.cz>

	* gcc.dg/tree-prof/val-prof-10.c: New test.

From-SVN: r263881
parent 3d78e008
2018-08-27 Martin Liska <mliska@suse.cz>
* config/i386/i386.c (ix86_expand_set_or_movmem): Dump
selected expansion strategy.
2018-08-27 Martin Liska <mliska@suse.cz>
* builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
* builtins.c (is_builtin_fn): Likewise.
* attribs.c (diag_attr_exclusions): Use new function
......
......@@ -27530,6 +27530,11 @@ ix86_expand_set_or_movmem (rtx dst, rtx src, rtx count_exp, rtx val_exp,
issetmem,
issetmem && val_exp == const0_rtx, have_as,
&dynamic_check, &noalign, false);
if (dump_file)
fprintf (dump_file, "Selected stringop expansion strategy: %s\n",
stringop_alg_names[alg]);
if (alg == libcall)
return false;
gcc_assert (alg != no_stringop);
2018-08-27 Martin Liska <mliska@suse.cz>
* gcc.dg/tree-prof/val-prof-10.c: New test.
2018-08-27 Martin Liska <mliska@suse.cz>
PR tree-optimization/86847
* gcc.dg/tree-ssa/switch-3.c: New test.
* gcc.dg/tree-ssa/vrp105.c: Remove.
......
/* { dg-options "-O2 -fdump-rtl-expand -mtune=core2" } */
/* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } } */
long buffer1[128], buffer2[128];
char *x;
void foo(long *r)
{
x = (char *)r;
asm volatile("" ::: "memory");
}
void
__attribute__((noinline))
compute()
{
volatile int n = 24;
__builtin_memcpy (buffer1, buffer2, n);
foo (&buffer1[0]);
}
int
main()
{
for (unsigned i = 0; i < 10000; i++)
compute ();
return 0;
}
/* { dg-final-use-not-autofdo { scan-rtl-dump "Selected stringop expansion strategy: rep_byte" "expand" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment