public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/68091] New: [6 Regression] [SH] internal compiler error: in expand_vec_cond_expr, at optabs.c:5391
@ 2015-10-25 22:58 kkojima at gcc dot gnu.org
  2015-10-26  4:33 ` [Bug target/68091] " olegendo at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: kkojima at gcc dot gnu.org @ 2015-10-25 22:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68091

            Bug ID: 68091
           Summary: [6 Regression] [SH] internal compiler error: in
                    expand_vec_cond_expr, at optabs.c:5391
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kkojima at gcc dot gnu.org
  Target Milestone: ---
            Target: sh4*-*-*

The recent change of middle-end for vector operations causes some new
ICEs in the testsuite on sh4.  A Typical one is:

trunk/gcc/testsuite/g++.dg/ext/vector27.C:12:16: internal compiler error: in
expand_vec_cond_expr, at optabs.c:5391
0x877369f expand_vec_cond_expr(tree_node*, tree_node*, tree_node*, tree_node*,
rtx_def*)
        ../../ORIG/trunk/gcc/optabs.c:5390
0x8588a0e do_store_flag
        ../../ORIG/trunk/gcc/expr.c:11052
0x8588a0e expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        ../../ORIG/trunk/gcc/expr.c:9010
0x846bb89 expand_gimple_stmt_1
        ../../ORIG/trunk/gcc/cfgexpand.c:3617

It seems that the middle-end change reveals a target problem that
sh_vector_mode_supported_p returns true even the target has no mov
insns for some vector modes.

 bool
 sh_vector_mode_supported_p (machine_mode mode)
 {
   if (TARGET_FPU_ANY
       && ((mode == V2SFmode)
          || (mode == V4SFmode)
          || (mode == V16SFmode)))
     return true;
   ...

It looks that this TARGET_FPU_ANY should be TARGET_SHMEDIA_FPU in
the first place, because all movv* patterns in sh.md are written for
SHMEDIA only.  The ICEs seen only on sh4 went away with replacing
TARGET_FPU_ANY with TARGET_SHMEDIA_FPU in sh_vector_mode_supported_p.
Although I know that we shouldn't add the new sh5 hunks, I think
that this change is rather a preparation to zap them out.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/68091] [6 Regression] [SH] internal compiler error: in expand_vec_cond_expr, at optabs.c:5391
  2015-10-25 22:58 [Bug target/68091] New: [6 Regression] [SH] internal compiler error: in expand_vec_cond_expr, at optabs.c:5391 kkojima at gcc dot gnu.org
@ 2015-10-26  4:33 ` olegendo at gcc dot gnu.org
  2015-10-26  8:05 ` kkojima at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-10-26  4:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68091

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |olegendo at gcc dot gnu.org

--- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Actually, I was thinking of adding vector move insns because otherwise it seems
difficult to add support for the e.g. fipr instruction (PR 55295).  Also, if I
remember correctly, PR 13423 can be improved by adding the corresponding vector
move insns.

However, I don't know when I will have time to work on this.  I think changing
it to TARGET_SHMEDIA condition is the way to go for now.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/68091] [6 Regression] [SH] internal compiler error: in expand_vec_cond_expr, at optabs.c:5391
  2015-10-25 22:58 [Bug target/68091] New: [6 Regression] [SH] internal compiler error: in expand_vec_cond_expr, at optabs.c:5391 kkojima at gcc dot gnu.org
  2015-10-26  4:33 ` [Bug target/68091] " olegendo at gcc dot gnu.org
@ 2015-10-26  8:05 ` kkojima at gcc dot gnu.org
  2015-10-26 11:30 ` kkojima at gcc dot gnu.org
  2015-10-26 11:40 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: kkojima at gcc dot gnu.org @ 2015-10-26  8:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68091

--- Comment #2 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
OK, I'll commit it as a quick fix if the usual tests done successfully.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/68091] [6 Regression] [SH] internal compiler error: in expand_vec_cond_expr, at optabs.c:5391
  2015-10-25 22:58 [Bug target/68091] New: [6 Regression] [SH] internal compiler error: in expand_vec_cond_expr, at optabs.c:5391 kkojima at gcc dot gnu.org
  2015-10-26  4:33 ` [Bug target/68091] " olegendo at gcc dot gnu.org
  2015-10-26  8:05 ` kkojima at gcc dot gnu.org
@ 2015-10-26 11:30 ` kkojima at gcc dot gnu.org
  2015-10-26 11:40 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: kkojima at gcc dot gnu.org @ 2015-10-26 11:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68091

--- Comment #3 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
Author: kkojima
Date: Mon Oct 26 11:30:11 2015
New Revision: 229336

URL: https://gcc.gnu.org/viewcvs?rev=229336&root=gcc&view=rev
Log:
[config/sh/sh.c] Fix PR68091: Return false for non shmedia targets in
sh_vector_mode_supported_p

        PR target/68091
        * config/sh/sh.c (sh_vector_mode_supported_p): Use
        TARGET_SHMEDIA_FPU instead of TARGET_FPU_ANY.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sh/sh.c


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/68091] [6 Regression] [SH] internal compiler error: in expand_vec_cond_expr, at optabs.c:5391
  2015-10-25 22:58 [Bug target/68091] New: [6 Regression] [SH] internal compiler error: in expand_vec_cond_expr, at optabs.c:5391 kkojima at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-10-26 11:30 ` kkojima at gcc dot gnu.org
@ 2015-10-26 11:40 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-10-26 11:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68091

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |6.0

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-26 11:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-25 22:58 [Bug target/68091] New: [6 Regression] [SH] internal compiler error: in expand_vec_cond_expr, at optabs.c:5391 kkojima at gcc dot gnu.org
2015-10-26  4:33 ` [Bug target/68091] " olegendo at gcc dot gnu.org
2015-10-26  8:05 ` kkojima at gcc dot gnu.org
2015-10-26 11:30 ` kkojima at gcc dot gnu.org
2015-10-26 11:40 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).