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

            Bug ID: 79965
           Summary: [7 Regression] OpenMP simd, invalid instructions on
                    ia32 core2
           Product: gcc
           Version: 7.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gmx dot de
  Target Milestone: ---

Created attachment 40926
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40926&action=edit
gfc-trunk -fopenmp gfcbug139.f90 -c -march=core2 -S -fverbose-asm

Hi,

the following code leads to invalid instructions on a dated machine
(arch=core2):

% cat gfcbug139.f90
pure real function add(a,b)
!$omp declare simd(add)
  real ,intent(in) :: a,b
  add=a+b
end function add

% gfc-trunk --version | head -1
GNU Fortran (GCC) 7.0.1 20170308 (experimental)

% gfc-trunk -fopenmp gfcbug139.f90 -c -march=core2
/tmp/cckyPHXa.s: Assembler messages:
/tmp/cckyPHXa.s:346: Error: no such instruction: `vmovdqu32 %zmm0,-192(%ebp)'
/tmp/cckyPHXa.s:347: Error: no such instruction: `vmovdqa64 %zmm1,%zmm0'
/tmp/cckyPHXa.s:348: Error: no such instruction: `vmovdqu32 %zmm0,-128(%ebp)'
/tmp/cckyPHXa.s:366: Error: bad register name `%zmm0'
/tmp/cckyPHXa.s:398: Error: no such instruction: `vmovdqu32 %zmm0,-192(%ebp)'
/tmp/cckyPHXa.s:399: Error: no such instruction: `vmovdqa64 %zmm1,%zmm0'
/tmp/cckyPHXa.s:400: Error: no such instruction: `vmovdqu32 %zmm0,-128(%ebp)'
/tmp/cckyPHXa.s:425: Error: bad register name `%zmm0'

See also attachment for the generated assembler.

Reply via email to