re PR target/83831 ([RX] Unused bclr,bnot,bset insns)
authorOleg Endo <olegendo@gcc.gnu.org>
Wed, 14 Feb 2018 12:33:37 +0000 (12:33 +0000)
committerOleg Endo <olegendo@gcc.gnu.org>
Wed, 14 Feb 2018 12:33:37 +0000 (12:33 +0000)
commit06e972705d2459498212969adac45c592c7a02bb
treec3a5987c8817bdf9a6c1352ffa17c07cecf511c4
parentd1fe6124618d472815cf46d9a8cf23e7d4a49cbe
re PR target/83831 ([RX] Unused bclr,bnot,bset insns)

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.

From-SVN: r257655
gcc/ChangeLog
gcc/config/rx/rx-protos.h
gcc/config/rx/rx.c
gcc/config/rx/rx.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/rx/pr83831.c [new file with mode: 0644]