Use shift instructions to eliminate redundant compare/test instructions on the H8
authorJeff Law <jeffreyalaw@gmail.com>
Fri, 2 Jul 2021 15:58:47 +0000 (11:58 -0400)
committerJeff Law <jeffreyalaw@gmail.com>
Fri, 2 Jul 2021 16:02:31 +0000 (12:02 -0400)
commit7aa5fb17a30ff0ce9928e5eac35b892d95e7eba5
tree6dd7cbabbc404d1b6d45a45e0b07d66cfc034ab3
parent84f7bab89279ca1234fef88929c74caeda8cb55e
Use shift instructions to eliminate redundant compare/test instructions on the H8

gcc/ChangeLog

* config/h8300/h8300-protos.h (compute_a_shift_cc): Accept
additional argument for the code.
* config/h8300/h8300.c (compute_a_shift_cc): Accept additional
argument for the code.  Just return if the ZN bits are useful or
not rather than the old style CC_* enums.
* config/h8300/shiftrotate.md (shiftqi_noscratch): Move before
more generic shiftqi patterns.
(shifthi_noscratch, shiftsi_noscratch): Similarly.
(shiftqi_noscratch_set_flags): New pattern.
(shifthi_noscratch_set_flags, shiftsi_noscratch_set_flags): Likewise.
gcc/config/h8300/h8300-protos.h
gcc/config/h8300/h8300.c
gcc/config/h8300/shiftrotate.md