Bug 24600 - [4.1 Regression] unrecognizable instruction
Summary: [4.1 Regression] unrecognizable instruction
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.1.0
: P3 critical
Target Milestone: 4.1.0
Assignee: Ulrich Weigand
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: ice-on-valid-code, patch
Depends on:
Blocks:
 
Reported: 2005-10-31 21:39 UTC by Richard Biener
Modified: 2005-11-02 23:09 UTC (History)
3 users (show)

See Also:
Host:
Target: s390-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-11-02 16:22:35


Attachments
reduced testcase (683 bytes, text/plain)
2005-11-01 13:01 UTC, Richard Biener
Details
Possible fix (not yet tested) (482 bytes, patch)
2005-11-01 21:54 UTC, Ulrich Weigand
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2005-10-31 21:39:02 UTC
Lots of package failures with

req_track.c:204: error: unrecognizable insn:                                               (insn 299 61 62 6 (set (reg/f:SI 66)                                                                 (plus:SI (reg/f:SI 126 [ server.sv_track ])                                                    (const_int 8 [0x8]))) -1 (nil)                                                     (nil))                                                                                 req_track.c:204: internal compiler error: in extract_insn, at recog.c:2084                

I'll extract a testcase another day.  Maybe it's obvious enough already.
Comment 1 Richard Biener 2005-10-31 21:40:54 UTC
Whoops, s390, not s390x.
Comment 2 Richard Biener 2005-11-01 13:01:14 UTC
Created attachment 10098 [details]
reduced testcase

testcase.
Comment 3 Richard Biener 2005-11-01 13:01:52 UTC
Critical, as this happens in a lot of packages.
Comment 4 Ulrich Weigand 2005-11-01 21:53:05 UTC
This is a bug in the old loop optimizer introduced by:
http://gcc.gnu.org/ml/gcc-patches/2005-03/msg00690.html

The problem with this patch is that it assumes
gen_move_insn where the source is a PLUS representing
an address always returns a valid instruction.  This is
not the case at least on s390.
Comment 5 Ulrich Weigand 2005-11-01 21:54:48 UTC
Created attachment 10106 [details]
Possible fix (not yet tested)

This patch is a possible fix to the problem;
it works by using force_operand to make sure
the address can be loaded correctly.
(Patch not yet tested.)
Comment 6 Ulrich Weigand 2005-11-02 16:22:35 UTC
Tested patch in:
http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00113.html
Comment 7 Ulrich Weigand 2005-11-02 23:06:30 UTC
Subject: Bug 24600

Author: uweigand
Date: Wed Nov  2 23:06:26 2005
New Revision: 106404

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106404
Log:
ChangeLog:

	PR target/24600
	* loop.c (loop_givs_rescan): Use force_operand to expand
	complex GIVs.

testsuite/ChangeLog:

	PR target/24600
	* gcc.dg/pr24600.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr24600.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/loop.c
    trunk/gcc/testsuite/ChangeLog

Comment 8 Ulrich Weigand 2005-11-02 23:09:45 UTC
Fixed.