* [Bug target/67506] [5/6 Regression][SH]: error: unrecognizable insn when compiling texlive-binaries
2015-09-08 20:39 [Bug target/67506] New: [SH][5]: error: unrecognizable insn when compiling texlive-binaries glaubitz at physik dot fu-berlin.de
@ 2015-09-09 0:39 ` kkojima at gcc dot gnu.org
2015-09-09 1:06 ` kkojima at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: kkojima at gcc dot gnu.org @ 2015-09-09 0:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67506
Kazumoto Kojima <kkojima at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Known to work| |4.9.4
Summary|[SH][5]: error: |[5/6 Regression][SH]:
|unrecognizable insn when |error: unrecognizable insn
|compiling texlive-binaries |when compiling
| |texlive-binaries
Known to fail| |5.2.1, 6.0
--- Comment #1 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
Cross trunk compiler fails with the same ICE.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/67506] [5/6 Regression][SH]: error: unrecognizable insn when compiling texlive-binaries
2015-09-08 20:39 [Bug target/67506] New: [SH][5]: error: unrecognizable insn when compiling texlive-binaries glaubitz at physik dot fu-berlin.de
2015-09-09 0:39 ` [Bug target/67506] [5/6 Regression][SH]: " kkojima at gcc dot gnu.org
@ 2015-09-09 1:06 ` kkojima at gcc dot gnu.org
2015-09-09 12:11 ` olegendo at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: kkojima at gcc dot gnu.org @ 2015-09-09 1:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67506
--- Comment #2 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
Created attachment 36309
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36309&action=edit
reduced test case
It looks that some problem happens in tstsi_t splitter.
The insns before splitting are:
(insn 124 123 125 13 (set (reg:HI 262 [ *_48 ])
(zero_extend:HI (reg:QI 263 [ *_48 ]))) tfoo.c:41 223
{zero_extendqihi2}
(expr_list:REG_DEAD (reg:QI 263 [ *_48 ])
(nil)))
(note 125 124 126 13 NOTE_INSN_DELETED)
(insn 126 125 127 13 (set (reg:SI 197 [ *_48 ])
(zero_extend:SI (reg:HI 262 [ *_48 ]))) tfoo.c:42 220
{*zero_extendhisi2_compact}
(nil))
(insn 127 126 128 13 (set (reg:SI 147 t)
(zero_extract:SI (subreg:SI (reg:HI 262 [ *_48 ]) 0)
(const_int 1 [0x1])
(const_int 7 [0x7]))) tfoo.c:42 516 {*zero_extract_0}
(nil))
and the last insn is splitted into
(insn 478 126 479 16 (set (reg:SI 147 t)
(eq:SI (and:SI (subreg:SI (reg:HI 262 [ *_48 ]) 0)
(const_int 128 [0x80]))
(const_int 0 [0]))) tfoo.c:42 -1
(nil))
with *zero_extract_0 splitter. Then it seems that tstsi_t splitter
replaces (subreg:SI (reg:HI 262 [ *_48 ]) 0) with (reg:HI 262 [ *_48 ])
as the result of eop0.use_as_extended_reg and we got
(insn 480 126 481 16 (set (reg:SI 147 t)
(eq:SI (and:SI (reg:HI 262 [ *_48 ])
(const_int 128 [0x80]))
(const_int 0 [0]))) tfoo.c:42 -1
(nil))
Oleg, could you please look at this?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/67506] [5/6 Regression][SH]: error: unrecognizable insn when compiling texlive-binaries
2015-09-08 20:39 [Bug target/67506] New: [SH][5]: error: unrecognizable insn when compiling texlive-binaries glaubitz at physik dot fu-berlin.de
2015-09-09 0:39 ` [Bug target/67506] [5/6 Regression][SH]: " kkojima at gcc dot gnu.org
2015-09-09 1:06 ` kkojima at gcc dot gnu.org
@ 2015-09-09 12:11 ` olegendo at gcc dot gnu.org
2015-09-10 10:23 ` olegendo at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-09-09 12:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67506
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-09-09
Ever confirmed|0 |1
--- Comment #4 from Oleg Endo <olegendo at gcc dot gnu.org> ---
The 'sh_extending_set_of_reg' thing seems to be working OK in this case.
However, the expected resulting reg is assumed to be SImode. But for this insn
...
(insn 124 123 125 13 (set (reg:HI 262 [ *_48 ])
(zero_extend:HI (reg:QI 263 [ *_48 ]))) tfoo.c:41 223
{zero_extendqihi2}
(expr_list:REG_DEAD (reg:QI 263 [ *_48 ])
(nil)))
... this is not the case (obviously it's HImode).
In the other function 'use_as_unextended_reg' I used 'simplify_gen_subreg'. In
'use_as_extended_reg' I assumed that the extension is always towards SImode and
forgot to handle it. It seems the following fixes it:
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 5813a77..d5e1a21 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -14332,6 +14332,11 @@ sh_extending_set_of_reg::use_as_extended_reg
(rtx_insn* use_at_insn) const
else
{
rtx extension_dst = XEXP (set_rtx, 0);
+
+ if (GET_MODE (extension_dst) != SImode)
+ extension_dst = simplify_gen_subreg (SImode, extension_dst,
+ GET_MODE (extension_dst), 0);
+
if (modified_between_p (extension_dst, insn, use_at_insn))
{
if (dump_file)
Could you please test it?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/67506] [5/6 Regression][SH]: error: unrecognizable insn when compiling texlive-binaries
2015-09-08 20:39 [Bug target/67506] New: [SH][5]: error: unrecognizable insn when compiling texlive-binaries glaubitz at physik dot fu-berlin.de
` (2 preceding siblings ...)
2015-09-09 12:11 ` olegendo at gcc dot gnu.org
@ 2015-09-10 10:23 ` olegendo at gcc dot gnu.org
2015-09-10 14:54 ` olegendo at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-09-10 10:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67506
--- Comment #6 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Kazumoto Kojima from comment #5)
> (In reply to Oleg Endo from comment #4)
> > Could you please test it?
>
> It fixes all test cases for the cross trunk sh4-unknown-linux-gnu compiler.
> There is no new failures with the top level "make -k check".
Thanks. I will commit it and add attachment 36309 as a c-torture test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/67506] [5/6 Regression][SH]: error: unrecognizable insn when compiling texlive-binaries
2015-09-08 20:39 [Bug target/67506] New: [SH][5]: error: unrecognizable insn when compiling texlive-binaries glaubitz at physik dot fu-berlin.de
` (3 preceding siblings ...)
2015-09-10 10:23 ` olegendo at gcc dot gnu.org
@ 2015-09-10 14:54 ` olegendo at gcc dot gnu.org
2015-09-10 15:07 ` olegendo at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-09-10 14:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67506
--- Comment #7 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Author: olegendo
Date: Thu Sep 10 14:53:48 2015
New Revision: 227646
URL: https://gcc.gnu.org/viewcvs?rev=227646&root=gcc&view=rev
Log:
gcc/
PR target/67506
* config/sh/sh.c (sh_extending_set_of_reg::use_as_extended_reg): Add
missing simplify_gen_subreg.
gcc/testsuite/
PR target/67506
* gcc.c-torture/compile/pr67506.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr67506.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sh/sh.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/67506] [5/6 Regression][SH]: error: unrecognizable insn when compiling texlive-binaries
2015-09-08 20:39 [Bug target/67506] New: [SH][5]: error: unrecognizable insn when compiling texlive-binaries glaubitz at physik dot fu-berlin.de
` (4 preceding siblings ...)
2015-09-10 14:54 ` olegendo at gcc dot gnu.org
@ 2015-09-10 15:07 ` olegendo at gcc dot gnu.org
2015-09-11 9:50 ` glaubitz at physik dot fu-berlin.de
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-09-10 15:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67506
--- Comment #8 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Author: olegendo
Date: Thu Sep 10 15:07:02 2015
New Revision: 227647
URL: https://gcc.gnu.org/viewcvs?rev=227647&root=gcc&view=rev
Log:
gcc/
Backport from mainline
2015-09-10 Oleg Endo <olegendo@gcc.gnu.org>
PR target/67506
* config/sh/sh.c (sh_extending_set_of_reg::use_as_extended_reg): Add
missing simplify_gen_subreg.
gcc/testsuite/
Backport from mainline
PR target/67506
* gcc.c-torture/compile/pr67506.c: New test.
Added:
branches/gcc-5-branch/gcc/testsuite/gcc.c-torture/compile/pr67506.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/sh/sh.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/67506] [5/6 Regression][SH]: error: unrecognizable insn when compiling texlive-binaries
2015-09-08 20:39 [Bug target/67506] New: [SH][5]: error: unrecognizable insn when compiling texlive-binaries glaubitz at physik dot fu-berlin.de
` (5 preceding siblings ...)
2015-09-10 15:07 ` olegendo at gcc dot gnu.org
@ 2015-09-11 9:50 ` glaubitz at physik dot fu-berlin.de
2015-09-11 10:58 ` olegendo at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2015-09-11 9:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67506
--- Comment #9 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Oleg Endo from comment #6)
> Thanks. I will commit it and add attachment 36309 [details] as a c-torture
> test.
Thanks for the quick bug fix! Matthias already uploaded a new gcc-5 snapshot
today which contains the fix :).
Adrian
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/67506] [5/6 Regression][SH]: error: unrecognizable insn when compiling texlive-binaries
2015-09-08 20:39 [Bug target/67506] New: [SH][5]: error: unrecognizable insn when compiling texlive-binaries glaubitz at physik dot fu-berlin.de
` (6 preceding siblings ...)
2015-09-11 9:50 ` glaubitz at physik dot fu-berlin.de
@ 2015-09-11 10:58 ` olegendo at gcc dot gnu.org
2015-09-20 20:34 ` glaubitz at physik dot fu-berlin.de
2015-09-21 0:29 ` olegendo at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-09-11 10:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67506
--- Comment #10 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to John Paul Adrian Glaubitz from comment #9)
>
> Thanks for the quick bug fix! Matthias already uploaded a new gcc-5 snapshot
> today which contains the fix :).
I guess it will take a while until you've got a new GCC build. I think we can
close this as fixed?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/67506] [5/6 Regression][SH]: error: unrecognizable insn when compiling texlive-binaries
2015-09-08 20:39 [Bug target/67506] New: [SH][5]: error: unrecognizable insn when compiling texlive-binaries glaubitz at physik dot fu-berlin.de
` (7 preceding siblings ...)
2015-09-11 10:58 ` olegendo at gcc dot gnu.org
@ 2015-09-20 20:34 ` glaubitz at physik dot fu-berlin.de
2015-09-21 0:29 ` olegendo at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2015-09-20 20:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67506
--- Comment #11 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Oleg Endo from comment #10)
> I guess it will take a while until you've got a new GCC build. I think we
> can close this as fixed?
texlive-bin builds fine with the new gcc-5 snapshot [1], thus this PR can be
closed as fixed.
Cheers,
Adrian
> [1] https://buildd.debian.org/status/fetch.php?pkg=texlive-bin&arch=sh4&ver=2015.20150524.37493-6&stamp=1442627466
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/67506] [5/6 Regression][SH]: error: unrecognizable insn when compiling texlive-binaries
2015-09-08 20:39 [Bug target/67506] New: [SH][5]: error: unrecognizable insn when compiling texlive-binaries glaubitz at physik dot fu-berlin.de
` (8 preceding siblings ...)
2015-09-20 20:34 ` glaubitz at physik dot fu-berlin.de
@ 2015-09-21 0:29 ` olegendo at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-09-21 0:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67506
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #12 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to John Paul Adrian Glaubitz from comment #11)
>
> texlive-bin builds fine with the new gcc-5 snapshot [1], thus this PR can be
> closed as fixed.
>
Thanks for reporting back.
^ permalink raw reply [flat|nested] 11+ messages in thread