https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72773

            Bug ID: 72773
           Summary: AVX512: Invalid operand for vcvttss2siq instruction
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wen...@mitsuba-renderer.org
  Target Milestone: ---

Created attachment 39047
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39047&action=edit
Preprocessed file causing the issue

Hi,

I'm running into a pesky AVX512F code generation issue using the latest HEAD
version of gcc on my OSX development machine.
Compiling the attached preprocessed file yields the following error messages:

g++-7 test.i -xc++ -std=c++14 -O3 -DNDEBUG -fomit-frame-pointer -mavx2 -mfma
-mf16c -mavx512f -Wa,-mavx512f

/var/folders/94/rfzxfhbn3hjb4p402lg_yjgw0000gn/T//cci4IcB4.s:555:14: error:
invalid operand for instruction
        vcvttss2siq     %xmm18, %rax
                        ^~~~~~
/var/folders/94/rfzxfhbn3hjb4p402lg_yjgw0000gn/T//cci4IcB4.s:559:14: error:
invalid operand for instruction
        vcvttss2siq     %xmm17, %rax
                        ^~~~~~
/var/folders/94/rfzxfhbn3hjb4p402lg_yjgw0000gn/T//cci4IcB4.s:561:14: error:
invalid operand for instruction
        vcvttss2siq     %xmm16, %rax
                        ^~~~~~

AFAIK on OSX, GCC uses the Clang assembler. There are thus two possibilities:

1. The vcvttss2siq instrunction does not exist for new-style xmm register
arguments, and GCC should not have generated it

2. It is a valid instruction, and it's the Clang assembler's fault for not
recognizing it.

I am not familiar enough with the AVX512F assembly and will create a ticket in
both the GCC and LLVM bugtracker so that this problem can be addressed.

Details on my compiler version:

COLLECT_GCC=g++-7
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/HEAD-/libexec/gcc/x86_64-apple-darwin15.5.0/7.0.0/lto-wrapper
Target: x86_64-apple-darwin15.5.0
Configured with: ../configure --build=x86_64-apple-darwin15.5.0
--prefix=/usr/local/Cellar/gcc/HEAD-
--libdir=/usr/local/Cellar/gcc/HEAD-/lib/gcc/
--enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-
--with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr
--with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl
--with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking
--enable-checking=release --enable-lto --with-build-config=bootstrap-debug
--disable-werror --with-pkgversion='Homebrew gcc HEAD- --without-multilib'
--with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin
--disable-nls --disable-multilib
Thread model: posix
gcc version 7.0.0 20160801 (experimental) (Homebrew gcc HEAD-
--without-multilib)

Reply via email to