]> git.ipfire.org Git - thirdparty/gcc.git/commit
xtensa: Tune "*btrue" insn pattern
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Thu, 12 Jan 2023 04:25:58 +0000 (13:25 +0900)
committerMax Filippov <jcmvbkbc@gmail.com>
Thu, 12 Jan 2023 12:44:06 +0000 (04:44 -0800)
commitbb65bd084a8739feb5b85f87135c531fc8b86572
treebc4b89e951591dc80211252ad4198caca507066e
parentdc22cf461278ace754042d9388a62afb002dfa0e
xtensa: Tune "*btrue" insn pattern

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