https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109204
Bug ID: 109204
Summary: Compiler emits unknows assembly instruction with -O3
level
Product: gcc
Version: 12.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: n.deshmukh at samsung dot com
Target Milestone: ---
When building a certain function with -O3 optimization enabled, the following
error are encountered during compilation:
/tmp/ccIbckyO.s: Assembler messages:
/tmp/ccIbckyO.s:967516: Error: invalid character '<' in mnemonic
/tmp/ccIbckyO.s:1023165: Error: invalid character '<' in mnemonic
/tmp/ccIbckyO.s:1023246: Error: invalid character '<' in mnemonic
The invalid instruction in question is the following instruction:
vinsert<i128vldq> $1, %xmm20, %ymm20, %ymm20
This instruction always occurs along with following code snippet:
vpunpcklwd %xmm18, %xmm19, %xmm20
vpunpckldq %xmm20, %xmm20, %xmm20
vpunpcklqdq %xmm20, %xmm20, %xmm20
vinsert<i128vldq> $1, %xmm20, %ymm20, %ymm20
vinsertf64x4 $0x1, %ymm20, %zmm20, %zmm20
The function corresponding to this assembly is a big function, making it hard
to pinpoint the C++ code which is generating such assembly. The file compiles
normally upto -O2 level. The following options were used for compiling the
file:
-g -std=c++17 -rdynamic -fno-builtin -mrecip=none -fno-omit-frame-pointer
-faligned-new -march=sapphirerapids -mavx512fp16 -Wno-deprecated-declarations
-Wno-maybe-uninitialized -Wno-uninitialized -static-libstdc++ -Wall -Wextra -O3
-std=c++2a -mprefer-vector-width=512 -Wsign-compare -Wuninitialized
-Wmaybe-uninitialized -ffp-contract=off -fconcepts