This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/65407] New: Extra mask register move in gcc.target/i386/avx512f-kandnw-1.c
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 12 Mar 2015 17:31:41 +0000
- Subject: [Bug target/65407] New: Extra mask register move in gcc.target/i386/avx512f-kandnw-1.c
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65407
Bug ID: 65407
Summary: Extra mask register move in
gcc.target/i386/avx512f-kandnw-1.c
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: ubizjak at gmail dot com
The compilation generates extra mask register move (kmov) when compiling
gcc.target/i386/avx512f-kandnw-1.c on x86_64-linux-gnu with
-O2 -mavx512f:
...
vmovaps %zmm0, -112(%rbp)
>> kandnw %k1, %k0, %k0
>> kmovw %k0, %k2
vmovaps -112(%rbp), %zmm1
vmovaps -112(%rbp), %zmm2
vmovaps -112(%rbp), %zmm0
vaddps %zmm1, %zmm2, %zmm0{%k2}
...
The register allocator could simply generate:
kandnw %k1, %k0, %k2
instead of the above two marked insns.