https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80566
Bug ID: 80566
Summary: no use of avx vmovups on ymm registry in set and copy
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: vincenzo.innocente at cern dot ch
Target Milestone: ---
in this example
#include <cstring>
int * foo() {
int * p = new int[16];
memset(p,0,16*sizeof(int));
return p;
}
int * foo(int * q) {
int * p = new int[16];
memcpy(q,p,16*sizeof(int));
return p;
}
gcc does not make use of vmovups on ymm registry
( c++ -O3 -Wall -march=haswell -S)
while (according to gcc.godbolt.org) clang 4.0 does
https://godbolt.org/g/qnX975