On Wed, Jan 11, 2023 at 8:26 PM Takayuki 'January June' Suwa <jjsuwa_sys3...@yahoo.co.jp> wrote: > > This branch instruction has short encoding if EQ/NE comparison against > immediate zero when the Code Density Option is enabled, but its "length" > attribute was only for normal encoding. This patch fixes it. > > This patch also prevents undesireable replacement the comparison immediate > zero of the instruction (short encoding, as mentioned above) with a > register that has value of zero (normal encoding) by the postreload pass. > > gcc/ChangeLog: > > * config/xtensa/xtensa.md (*btrue): > Correct value of the attribute "length" that depends on > TARGET_DENSITY and operands, and add '?' character to the register > constraint of the compared operand. > --- > gcc/config/xtensa/xtensa.md | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max