Following ICEs: $ aarch64-linux-gnu-gfortran /home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/errnocheck_1.f90 -mlow-precision-sqrt -funsafe-math-optimizations -c /home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/errnocheck_1.f90:7:0: end subroutine Error: unrecognizable insn: (insn 8 7 9 2 (set (reg:DI 93) (neg:DI (eq:DI (reg:DF 90 [ _1 ]) (const_double:DF 0.0 [0x0.0p+0])))) "/home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/errnocheck_1.f90":6 -1 (nil)) during RTL pass: vregs /home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/errnocheck_1.f90:7:0: internal compiler error: in extract_insn, at recog.c:2304 0x5b09bd _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) .././../gcc/rtl-error.c:108 0x5b09dc _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) .././../gcc/rtl-error.c:116 0xb98c87 extract_insn(rtx_insn*) .././../gcc/recog.c:2304 0x93ea31 instantiate_virtual_regs_in_insn .././../gcc/function.c:1599 0x93ea31 instantiate_virtual_regs .././../gcc/function.c:1969 0x93ea31 execute .././../gcc/function.c:2018
Started with r256612.
The aarch64_cmpeqdf instruction no longer matches, because the CONST0_RTX (DFmode) operand doesn't match the aarch64_simd_reg_or_zero predicate. Either aarch64_simd_reg_or_zero predicate should use aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero, or the aarch64_cmp<optab><mode> pattern with VHSDF_HSDF needs to use some other predicate at least for the scalar modes.
Created attachment 43512 [details] gcc8-pr84565.patch This works for me.
Author: jakub Date: Wed Mar 7 10:39:32 2018 New Revision: 258333 URL: https://gcc.gnu.org/viewcvs?rev=258333&root=gcc&view=rev Log: PR fortran/84565 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero. * gfortran.dg/pr84565.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/pr84565.f90 Modified: trunk/gcc/ChangeLog trunk/gcc/config/aarch64/predicates.md trunk/gcc/testsuite/ChangeLog
Fixed.