[Bug target/83831] [RX] Unused bclr,bnot,bset insns

2018-06-18 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83831

Oleg Endo  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Oleg Endo  ---
Fixed on GCC 8.  Patches for GCC 6 and GCC 7 available here.

[Bug target/83831] [RX] Unused bclr,bnot,bset insns

2018-06-18 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83831

Oleg Endo  changed:

   What|Removed |Added

  Attachment #43270|0   |1
is obsolete||

--- Comment #7 from Oleg Endo  ---
Created attachment 44292
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44292&action=edit
Patch for GCC 7

Updated patch for GCC 7

[Bug target/83831] [RX] Unused bclr,bnot,bset insns

2018-06-18 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83831

Oleg Endo  changed:

   What|Removed |Added

  Attachment #43266|0   |1
is obsolete||

--- Comment #6 from Oleg Endo  ---
Created attachment 44291
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44291&action=edit
Patch for GCC 6

Updated patch for GCC 6

[Bug target/83831] [RX] Unused bclr,bnot,bset insns

2018-02-16 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83831

--- Comment #5 from Oleg Endo  ---
Author: olegendo
Date: Fri Feb 16 13:52:49 2018
New Revision: 257735

URL: https://gcc.gnu.org/viewcvs?rev=257735&root=gcc&view=rev
Log:
gcc/
PR target/83831
* config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
to QImode.

gcc/testsuite/
PR target/83831
* gcc.target/rx/pr83831.c (test_3, test_6): Adjust test cases.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rx/rx.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/rx/pr83831.c

[Bug target/83831] [RX] Unused bclr,bnot,bset insns

2018-02-14 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83831

--- Comment #4 from Oleg Endo  ---
Author: olegendo
Date: Wed Feb 14 12:33:37 2018
New Revision: 257655

URL: https://gcc.gnu.org/viewcvs?rev=257655&root=gcc&view=rev
Log:
gcc/
PR target/83831
* config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
declarations.
(set_of_reg): New struct.
(rx_find_set_of_reg, rx_find_use_of_reg): New functions.
* config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
functions.
* config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
Split into bitclr, bitset, bitinvert patterns if appropriate.
(*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
use rx_fuse_in_memory_bitop.
(*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
to named insn, correct maximum insn length.

gcc/testsuite/
PR target/83831
* gcc.target/rx/pr83831.c: New tests.


Added:
trunk/gcc/testsuite/gcc.target/rx/pr83831.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rx/rx-protos.h
trunk/gcc/config/rx/rx.c
trunk/gcc/config/rx/rx.md
trunk/gcc/testsuite/ChangeLog

[Bug target/83831] [RX] Unused bclr,bnot,bset insns

2018-01-29 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83831

--- Comment #3 from Oleg Endo  ---
Created attachment 43270
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43270&action=edit
Patch for GCC 7

Tested with "make -k check" on rx-sim for c and c++ with no new failures.

[Bug target/83831] [RX] Unused bclr,bnot,bset insns

2018-01-28 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83831

Oleg Endo  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-01-28
Summary|[6/7/8 Regression][RX]  |[RX] Unused bclr,bnot,bset
   |Unused bclr,bnot,bset insns |insns
 Ever confirmed|0   |1

--- Comment #2 from Oleg Endo  ---
(In reply to Oleg Endo from comment #0)
> These cases should be emitting the bclr, bnot, bset instructions.  They are
> present in rx.md but I guess the combine pass does not catch them because of
> some reasons.  I assume these patterns used to work at some point in time,
> so this must be some kind of regression.  It's not working on the latest
> supported branch (GCC 6) and trunk (GCC 8).

While working on this issue, I realized that the patterns could have never
worked to the full extent.  There was also a corresponding comment in rx.md. 
So it's not really a regression, but I'll be posting patches for GCC 6 and GCC
7 here in case somebody needs it.