public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/58475] New: SH4 insn swapb does not satisfy its constraints:
@ 2013-09-19 13:26 chrbr at gcc dot gnu.org
  2013-09-19 13:38 ` [Bug target/58475] " chrbr at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: chrbr at gcc dot gnu.org @ 2013-09-19 13:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58475

            Bug ID: 58475
           Summary: SH4 insn swapb does not satisfy its constraints:
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chrbr at gcc dot gnu.org

Created attachment 30863
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30863&action=edit
test case

cc1 -Os -m4 swapb_ice.c -o 2.s -quiet
swapb_ice.c: In function 'kerninfo':
swapb_ice.c:15:1: error: insn does not satisfy its constraints:
 }
 ^
(insn 35 8 10 2 (set (reg:SI 150 fpul)
        (ior:SI (and:SI (reg:SI 4 r4 [170])
                (const_int 4294901760 [0xffff0000]))
            (ior:SI (and:SI (ashift:SI (reg:SI 4 r4 [170])
                        (const_int 8 [0x8]))
                    (const_int 65280 [0xff00]))
                (and:SI (ashiftrt:SI (reg:SI 4 r4 [170])
                        (const_int 8 [0x8]))
                    (const_int 255 [0xff]))))) swapb_ice.c:14 209 {swapbsi2}
     (nil))
swapb_ice.c:15:1: internal compiler error: in copyprop_hardreg_forward_1, at
regcprop.c:774

Only fails for -m4 (-m2, ... are OK)


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

* [Bug target/58475] SH4 insn swapb does not satisfy its constraints:
  2013-09-19 13:26 [Bug target/58475] New: SH4 insn swapb does not satisfy its constraints: chrbr at gcc dot gnu.org
@ 2013-09-19 13:38 ` chrbr at gcc dot gnu.org
  2013-09-20 13:50 ` olegendo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: chrbr at gcc dot gnu.org @ 2013-09-19 13:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58475

--- Comment #1 from chrbr at gcc dot gnu.org ---
The problem is that

  [(set (match_operand:SI 0 "arith_reg_dest" "=r")
    (ior:SI (and:SI (match_operand:SI 1 "arith_reg_operand" "r")

accepts fpul registers in the predicate, but not in the constraints. The reason
is that arith_reg_dest is tricked to accept FPUL_REG when TARGET_SH4.

There is no reason that a fpul register is accepted as a source operand for an
arithmetic op, unless the floating point transfer needs to be expressed in the
rtl, so fpul will need reloading.

.


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

* [Bug target/58475] SH4 insn swapb does not satisfy its constraints:
  2013-09-19 13:26 [Bug target/58475] New: SH4 insn swapb does not satisfy its constraints: chrbr at gcc dot gnu.org
  2013-09-19 13:38 ` [Bug target/58475] " chrbr at gcc dot gnu.org
@ 2013-09-20 13:50 ` olegendo at gcc dot gnu.org
  2013-09-23  8:30 ` chrbr at gcc dot gnu.org
  2013-09-23  8:55 ` chrbr at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-09-20 13:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58475

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |sh*-*-*
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-09-20
                 CC|                            |olegendo at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> ---
FPUL handling seems to need some work in general, see also PR 54429 and PR
48596


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

* [Bug target/58475] SH4 insn swapb does not satisfy its constraints:
  2013-09-19 13:26 [Bug target/58475] New: SH4 insn swapb does not satisfy its constraints: chrbr at gcc dot gnu.org
  2013-09-19 13:38 ` [Bug target/58475] " chrbr at gcc dot gnu.org
  2013-09-20 13:50 ` olegendo at gcc dot gnu.org
@ 2013-09-23  8:30 ` chrbr at gcc dot gnu.org
  2013-09-23  8:55 ` chrbr at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: chrbr at gcc dot gnu.org @ 2013-09-23  8:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58475

--- Comment #3 from chrbr at gcc dot gnu.org ---
Author: chrbr
Date: Mon Sep 23 08:30:00 2013
New Revision: 202825

URL: http://gcc.gnu.org/viewcvs?rev=202825&root=gcc&view=rev
Log:
2013-09-23  Christian Bruel  <christian.bruel@st.com>

        PR target/58475
        * config/sh/sh.md (movsf_ie): Allow fpul_operand.
        * config/sh/predicate.md (arith_reg_operand): Disallow FPUL_REG.


Added:
    trunk/gcc/testsuite/gcc.target/sh/torture/pr58475.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sh/predicates.md
    trunk/gcc/config/sh/sh.md
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/58475] SH4 insn swapb does not satisfy its constraints:
  2013-09-19 13:26 [Bug target/58475] New: SH4 insn swapb does not satisfy its constraints: chrbr at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-09-23  8:30 ` chrbr at gcc dot gnu.org
@ 2013-09-23  8:55 ` chrbr at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: chrbr at gcc dot gnu.org @ 2013-09-23  8:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58475

chrbr at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from chrbr at gcc dot gnu.org ---
Fixed on trunk


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

end of thread, other threads:[~2013-09-23  8:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-19 13:26 [Bug target/58475] New: SH4 insn swapb does not satisfy its constraints: chrbr at gcc dot gnu.org
2013-09-19 13:38 ` [Bug target/58475] " chrbr at gcc dot gnu.org
2013-09-20 13:50 ` olegendo at gcc dot gnu.org
2013-09-23  8:30 ` chrbr at gcc dot gnu.org
2013-09-23  8:55 ` chrbr 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).