Bug 72843 - [7 Regression] internal compiler error: in lra_set_insn_recog_data, at lra.c:964
Summary: [7 Regression] internal compiler error: in lra_set_insn_recog_data, at lra.c:964
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 7.0
: P3 normal
Target Milestone: 5.5
Assignee: Uroš Bizjak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-08 18:15 UTC by H.J. Lu
Modified: 2016-08-22 19:16 UTC (History)
2 users (show)

See Also:
Host:
Target: i?86-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2016-08-08 00:00:00


Attachments
A testcase (2.08 KB, text/x-csrc)
2016-08-08 18:27 UTC, H.J. Lu
Details
Proposed patch (476 bytes, patch)
2016-08-08 20:45 UTC, Uroš Bizjak
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2016-08-08 18:15:47 UTC
On Linux/x86, when compiled with

-mtune=slm -O2 -march=i686 -msse2 -mfpmath=sse -m32

r239180 caused:

/export/gnu/import/git/gcc-regression/gcc/libquadmath/math/asinq.c: In function ‘asinq’:
/export/gnu/import/git/gcc-regression/gcc/libquadmath/math/asinq.c:254:1: internal compiler error: in lra_set_insn_recog_data, at lra.c:964
 }
 ^
0x87ea563 lra_set_insn_recog_data(rtx_insn*)
	/export/gnu/import/git/gcc-regression/gcc/gcc/lra.c:962
0x87e8913 lra_get_insn_recog_data
	/export/gnu/import/git/gcc-regression/gcc/gcc/lra-int.h:487
0x87ebc17 lra_update_insn_regno_info(rtx_insn*)
	/export/gnu/import/git/gcc-regression/gcc/gcc/lra.c:1584
0x87ec0c0 lra_push_insn_1
	/export/gnu/import/git/gcc-regression/gcc/gcc/lra.c:1735
0x87ec0ef lra_push_insn(rtx_insn*)
	/export/gnu/import/git/gcc-regression/gcc/gcc/lra.c:1743
0x87ec1e4 push_insns
	/export/gnu/import/git/gcc-regression/gcc/gcc/lra.c:1786
0x87ec47b lra_process_new_insns(rtx_insn*, rtx_insn*, rtx_insn*, char const*)
	/export/gnu/import/git/gcc-regression/gcc/gcc/lra.c:1844
0x8804827 remove_inheritance_pseudos
	/export/gnu/import/git/gcc-regression/gcc/gcc/lra-constraints.c:6352
0x880578b lra_undo_inheritance()
	/export/gnu/import/git/gcc-regression/gcc/gcc/lra-constraints.c:6672
0x87ed6bf lra(_IO_FILE*)
	/export/gnu/import/git/gcc-regression/gcc/gcc/lra.c:2423
0x87a3db0 do_reload
	/export/gnu/import/git/gcc-regression/gcc/gcc/ira.c:5384
0x87a4200 execute
	/export/gnu/import/git/gcc-regression/gcc/gcc/ira.c:5568
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 H.J. Lu 2016-08-08 18:27:13 UTC
Created attachment 39080 [details]
A testcase
Comment 2 H.J. Lu 2016-08-08 18:40:40 UTC
LRA ICEs on

(insn 1932 1931 1791 22 (set (reg/v:TF 1001 [orig:161 t ] [161])
        (const_double:TF 0.0 [0x0.0p+0])) /tmp/x.c:85 -1
     (nil))

due to

(define_insn "*movtf_internal"
  [(set (match_operand:TF 0 "nonimmediate_operand" "=v,v ,m,?*r ,!o") 
        (match_operand:TF 1 "general_operand"      "C ,vm,v,*roF,*rC"))]
  "(TARGET_64BIT || TARGET_SSE)
   && !(MEM_P (operands[0]) && MEM_P (operands[1]))
   && (!can_create_pseudo_p ()
       || !CONST_DOUBLE_P (operands[1])
       || ((optimize_function_for_size_p (cfun)
            || (ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC))
           && standard_sse_constant_p (operands[1], TFmode) == 1
           && !memory_operand (operands[0], TFmode))
       || (!TARGET_MEMORY_MISMATCH_STALL
           && memory_operand (operands[0], TFmode)))"
Comment 3 Uroš Bizjak 2016-08-08 20:45:19 UTC
Created attachment 39084 [details]
Proposed patch

HJ, can you please test this patch?
Comment 4 H.J. Lu 2016-08-09 15:05:45 UTC
(In reply to Uroš Bizjak from comment #3)
> Created attachment 39084 [details]
> Proposed patch
> 
> HJ, can you please test this patch?

It works.  Thanks.
Comment 5 uros 2016-08-09 15:36:06 UTC
Author: uros
Date: Tue Aug  9 15:35:34 2016
New Revision: 239293

URL: https://gcc.gnu.org/viewcvs?rev=239293&root=gcc&view=rev
Log:
	PR target/72843
	* config/i386/i386.md (*movtf_internal): Use
	lra_in_progress || reload_completed instead of !can_create_pseudo_p
	in the insn constraint.
	(*movxf_internal): Ditto.
	(*movdf_internal): Ditto.
	(*movsf_internal): Ditto.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.md
Comment 6 Uroš Bizjak 2016-08-09 15:42:08 UTC
Fixed in mainline, backports pending.
Comment 7 uros 2016-08-14 13:43:10 UTC
Author: uros
Date: Sun Aug 14 13:42:38 2016
New Revision: 239456

URL: https://gcc.gnu.org/viewcvs?rev=239456&root=gcc&view=rev
Log:
	Backport from mainline
	2016-08-14  Uros Bizjak  <ubizjak@gmail.com>

	PR target/76342
	* config/i386/avx512fintrin.h (_mm512_undefined_epi32):
	Renamed from _mm512_undefined_si512.
	(_mm_undefined_si512): New definition.

	Backport from mainline:
	2016-08-09  David Wohlferd  <dw@LimeGreenSocks.com>

	* config/i3836/avx512fintrin.h (_mm512_cvtsepi64_epi32): Remove
	unused variable __O.

	Backport from mainline:
	2016-08-09  Uros Bizjak  <ubizjak@gmail.com>

	PR target/72843
	* config/i386/i386.md (*movtf_internal): Use
	lra_in_progress || reload_completed instead of !can_create_pseudo_p
	in the insn constraint.
	(*movxf_internal): Ditto.
	(*movdf_internal): Ditto.
	(*movsf_internal): Ditto.

testsuite/ChangeLog:

	Backport from mainline
	2016-08-14  Uros Bizjak  <ubizjak@gmail.com>

	PR target/76342
	* gcc.target/i386/pr76342.c: New test.


Added:
    branches/gcc-6-branch/gcc/testsuite/gcc.target/i386/pr76342.c
Modified:
    branches/gcc-6-branch/gcc/ChangeLog
    branches/gcc-6-branch/gcc/config/i386/avx512bwintrin.h
    branches/gcc-6-branch/gcc/config/i386/avx512dqintrin.h
    branches/gcc-6-branch/gcc/config/i386/avx512fintrin.h
    branches/gcc-6-branch/gcc/config/i386/avx512ifmaintrin.h
    branches/gcc-6-branch/gcc/config/i386/avx512ifmavlintrin.h
    branches/gcc-6-branch/gcc/config/i386/avx512vbmiintrin.h
    branches/gcc-6-branch/gcc/config/i386/avx512vbmivlintrin.h
    branches/gcc-6-branch/gcc/config/i386/avx512vlbwintrin.h
    branches/gcc-6-branch/gcc/config/i386/avx512vldqintrin.h
    branches/gcc-6-branch/gcc/config/i386/avx512vlintrin.h
    branches/gcc-6-branch/gcc/config/i386/i386.md
    branches/gcc-6-branch/gcc/testsuite/ChangeLog
Comment 8 uros 2016-08-22 18:58:09 UTC
Author: uros
Date: Mon Aug 22 18:57:37 2016
New Revision: 239669

URL: https://gcc.gnu.org/viewcvs?rev=239669&root=gcc&view=rev
Log:
	Backport from mainline
	2016-08-14  Uros Bizjak  <ubizjak@gmail.com>

	PR target/76342
	* config/i386/avx512fintrin.h (_mm512_undefined_epi32):
	Renamed from _mm512_undefined_si512.
	(_mm_undefined_si512): New definition.

	Backport from mainline:
	2016-08-09  David Wohlferd  <dw@LimeGreenSocks.com>

	* config/i3836/avx512fintrin.h (_mm512_cvtsepi64_epi32): Remove
	unused variable __O.

	Backport from mainline:
	2016-08-09  Uros Bizjak  <ubizjak@gmail.com>

	PR target/72843
	* config/i386/i386.md (*movtf_internal): Use
	lra_in_progress || reload_completed instead of !can_create_pseudo_p
	in the insn constraint.
	(*movxf_internal): Ditto.
	(*movdf_internal): Ditto.
	(*movsf_internal): Ditto.

testsuite/ChangeLog:

	Backport from mainline
	2016-08-14  Uros Bizjak  <ubizjak@gmail.com>

	PR target/76342
	* gcc.target/i386/pr76342.c: New test.


Added:
    branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/pr76342.c
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/config/i386/avx512bwintrin.h
    branches/gcc-5-branch/gcc/config/i386/avx512dqintrin.h
    branches/gcc-5-branch/gcc/config/i386/avx512fintrin.h
    branches/gcc-5-branch/gcc/config/i386/avx512ifmaintrin.h
    branches/gcc-5-branch/gcc/config/i386/avx512ifmavlintrin.h
    branches/gcc-5-branch/gcc/config/i386/avx512vbmiintrin.h
    branches/gcc-5-branch/gcc/config/i386/avx512vbmivlintrin.h
    branches/gcc-5-branch/gcc/config/i386/avx512vlbwintrin.h
    branches/gcc-5-branch/gcc/config/i386/avx512vldqintrin.h
    branches/gcc-5-branch/gcc/config/i386/avx512vlintrin.h
    branches/gcc-5-branch/gcc/config/i386/i386.md
    branches/gcc-5-branch/gcc/testsuite/ChangeLog
Comment 9 Uroš Bizjak 2016-08-22 19:16:02 UTC
Fixed everywhere.