https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70581
Bug ID: 70581 Summary: [6 regression] gcc.dg/lto/simd-function FAILs Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org Target Milestone: --- Host: i386-pc-solaris2.1[012] Target: i386-pc-solaris2.1[012] Build: i386-pc-solaris2.1[012] After 20160401, the gcc.dg/lto/simd-function testcase began to FAIL on Solaris/x86 with /bin/as: FAIL: gcc.dg/lto/simd-function c_lto_simd-function_0.o assemble, -fopenmp-simd -O3 -ffast-math -mavx2 -flto -flto-partition=max UNRESOLVED: gcc.dg/lto/simd-function c_lto_simd-function_0.o-c_lto_simd-function_0.o execute -fopenmp-simd -O3 -ffast-math -mavx2 -flto -flto-partition=max UNRESOLVED: gcc.dg/lto/simd-function c_lto_simd-function_0.o-c_lto_simd-function_0.o link -fopenmp-simd -O3 -ffast-math -mavx2 -flto -flto-partition=max Assembler: simd-function_0.c "/var/tmp//ccw.aGWM.s", line 850 : Invalid instruction argument Near line: " vmulps %zmm1, %zmm0, %zmm0" "/var/tmp//ccw.aGWM.s", line 858 : Illegal mnemonic Near line: " vpxord %zmm3, %zmm3, %zmm3" "/var/tmp//ccw.aGWM.s", line 858 : Syntax error Near line: " vpxord %zmm3, %zmm3, %zmm3" "/var/tmp//ccw.aGWM.s", line 860 : Invalid instruction argument Near line: " vmulps %zmm1, %zmm0, %zmm0" "/var/tmp//ccw.aGWM.s", line 863 : Illegal mnemonic Near line: " vpcmpd $4, %zmm3, %zmm2, %k1" "/var/tmp//ccw.aGWM.s", line 863 : Syntax error Near line: " vpcmpd $4, %zmm3, %zmm2, %k1" "/var/tmp//ccw.aGWM.s", line 866 : Illegal mnemonic Near line: " kmovw %k1, %eax" "/var/tmp//ccw.aGWM.s", line 866 : Syntax error Near line: " kmovw %k1, %eax" "/var/tmp//ccw.aGWM.s", line 870 : Invalid instruction argument Near line: " vmovaps %zmm0, -120(%ebp){%k1}" "/var/tmp//ccw.aGWM.s", line 872 : Invalid instruction argument Near line: " vmovaps -120(%ebp), %zmm0" for both 32 and 64-bit. It seems the compiler started to emit avx512f insns despite the -mavx2. Either the testcase needs to be amended requiring the corresponding effective-target, or the compiler fixed not to emit those unless told to... Here's a diff between the assembler outputs from 20160401 and 20160407: --- /homes/ro/simd-function_0.s 2016-04-07 18:05:16.449629000 +0200 +++ simd-function_0.s 2016-04-07 18:06:05.170292167 +0200 [...] @@ -846,6 +846,39 @@ leal -4(%ecx), %esp ret .size _ZGVdM8vv_my_mul, .-_ZGVdM8vv_my_mul + .p2align 4,,15 + .globl _ZGVeN16vv_my_mul + .type _ZGVeN16vv_my_mul, @function +_ZGVeN16vv_my_mul: + vmulps %zmm1, %zmm0, %zmm0 + ret + .size _ZGVeN16vv_my_mul, .-_ZGVeN16vv_my_mul + .p2align 4,,15 + .globl _ZGVeM16vv_my_mul + .type _ZGVeM16vv_my_mul, @function +_ZGVeM16vv_my_mul: + leal 4(%esp), %ecx + vpxord %zmm3, %zmm3, %zmm3 + andl $-64, %esp + vmulps %zmm1, %zmm0, %zmm0 + pushl -4(%ecx) + pushl %ebp + vpcmpd $4, %zmm3, %zmm2, %k1 + movl %esp, %ebp + pushl %ecx + kmovw %k1, %eax + subl $308, %esp + testw %ax, %ax + je .L89 + vmovaps %zmm0, -120(%ebp){%k1} +.L89: + vmovaps -120(%ebp), %zmm0 + addl $308, %esp + popl %ecx + popl %ebp + leal -4(%ecx), %esp + ret + .size _ZGVeM16vv_my_mul, .-_ZGVeM16vv_my_mul .comm x,16384,32 .section .rodata .align 4 Rainer