x86: Add testcases for PR target/80566
PR target/80566 * g++.target/i386/pr80566-1.C: New test. * g++.target/i386/pr80566-2.C: Likewise.
This commit is contained in:
parent
daaed9e365
commit
585394d30d
|
@ -0,0 +1,15 @@
|
|||
// { dg-do compile }
|
||||
// { dg-options "-O2 -march=haswell" }
|
||||
|
||||
#include <cstring>
|
||||
|
||||
int *
|
||||
foo()
|
||||
{
|
||||
int * p = new int[16];
|
||||
memset(p,0,16*sizeof(int));
|
||||
return p;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "vpxor\[ \\t\]+\[^\n\]*%xmm" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vmovdqu\[ \\t\]+\[^\n\]*%ymm" 2 } } */
|
|
@ -0,0 +1,14 @@
|
|||
// { dg-do compile }
|
||||
// { dg-options "-O2 -march=haswell" }
|
||||
|
||||
#include <cstring>
|
||||
|
||||
int *
|
||||
foo(int * q)
|
||||
{
|
||||
int * p = new int[16];
|
||||
memcpy(q,p,16*sizeof(int));
|
||||
return p;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "vmovdqu\[ \\t\]+\[^\n\]*%ymm" 4 } } */
|
Loading…
Reference in New Issue