Bug 84565 - [8 Regression] ICE in extract_insn, at recog.c:2304 on aarch64
Summary: [8 Regression] ICE in extract_insn, at recog.c:2304 on aarch64
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 8.0
: P1 normal
Target Milestone: 8.0
Assignee: Jakub Jelinek
URL: https://gcc.gnu.org/ml/gcc-patches/20...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-26 08:44 UTC by Martin Liška
Modified: 2018-03-07 10:43 UTC (History)
2 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: aarch64-linux-gnu
Build:
Known to work:
Known to fail: 8.0
Last reconfirmed: 2018-02-26 00:00:00


Attachments
gcc8-pr84565.patch (561 bytes, patch)
2018-02-26 15:35 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2018-02-26 08:44:30 UTC
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
Comment 1 Jakub Jelinek 2018-02-26 14:59:16 UTC
Started with r256612.
Comment 2 Jakub Jelinek 2018-02-26 15:32:56 UTC
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.
Comment 3 Jakub Jelinek 2018-02-26 15:35:03 UTC
Created attachment 43512 [details]
gcc8-pr84565.patch

This works for me.
Comment 4 Jakub Jelinek 2018-03-07 10:40:04 UTC
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
Comment 5 Jakub Jelinek 2018-03-07 10:43:45 UTC
Fixed.