This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/80689] 128 loads generated for structure copying with gcc 7.1.0 and leads to STLF stalls in avx2 targets.
- From: "venkataramanan.kumar at amd dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 09 May 2017 14:08:11 +0000
- Subject: [Bug target/80689] 128 loads generated for structure copying with gcc 7.1.0 and leads to STLF stalls in avx2 targets.
- Auto-submitted: auto-generated
- References: <bug-80689-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80689
--- Comment #6 from Venkataramanan <venkataramanan.kumar at amd dot com> ---
(In reply to Richard Biener from comment #4)
> What does ICC do if you use int and/or short fields in st1? Does it perform
> struct copying member-wise?
It copies member wise. -O2 /-O2 -march=core-avx2
For "int" member types
test(st2*, unsigned long, unsigned long, long, long):
mov DWORD PTR [4+rdi], esi #29.9
mov DWORD PTR [8+rdi], edx #29.9
mov DWORD PTR [12+rdi], ecx #29.9
mov DWORD PTR [16+rdi], r8d #29.9
ret #25.1
Set(st1 const*, st2*):
mov eax, DWORD PTR [rdi] #29.22
mov DWORD PTR [4+rsi], eax #29.9
mov edx, DWORD PTR [4+rdi] #29.22
mov DWORD PTR [8+rsi], edx #29.9
mov ecx, DWORD PTR [8+rdi] #29.22
mov DWORD PTR [12+rsi], ecx #29.9
mov r8d, DWORD PTR [12+rdi] #29.22
mov DWORD PTR [16+rsi], r8d #29.9
ret
for "short" member type
test(st2*, unsigned long, unsigned long, long, long):
mov WORD PTR [4+rdi], si #29.9
mov WORD PTR [6+rdi], dx #29.9
mov WORD PTR [8+rdi], cx #29.9
mov WORD PTR [10+rdi], r8w #29.9
ret #25.1
Set(st1 const*, st2*):
movzx eax, WORD PTR [rdi] #29.22
mov WORD PTR [4+rsi], ax #29.9
movzx edx, WORD PTR [2+rdi] #29.22
mov WORD PTR [6+rsi], dx #29.9
movzx ecx, WORD PTR [4+rdi] #29.22
mov WORD PTR [8+rsi], cx #29.9
movzx r8d, WORD PTR [6+rdi] #29.22
mov WORD PTR [10+rsi], r8w #29.9
ret #30.1