[committed] Fix length computation of single bit bitfield extraction on H8
commit1f55c5cc698519094f751257db62ff274c015fdc
authorJeff Law <jlaw@ventanamicro.com>
Sun, 10 Dec 2023 17:05:18 +0000 (10 10:05 -0700)
committerJeff Law <jlaw@ventanamicro.com>
Sun, 10 Dec 2023 17:05:18 +0000 (10 10:05 -0700)
tree844aabebe942e1e5c0ab07eeac838d9c9b9be0d3
parent4ac358c619e364ad767242409765c178da9d83e0
[committed] Fix length computation of single bit bitfield extraction on H8

Various approaches are used to optimize extracting a sign extended single bit
bitfield.  The length computation of 10 bytes was conservatively correct, but
inaccurate.

In particular when the bit we want is in the low half word we don't need the
move high half to low half instruction.  Account for that in the length
computation.

This was spotted when looking at regressions in the generalized signed bitfield
extraction pattern.

This has been regression tested on the H8 port.

gcc/
* config/h8300/combiner.md (single bit signed bitfield extraction): Fix
length computation when the bit we want is in the low half word.
gcc/config/h8300/combiner.md