On 4/9/25 1:25 PM, Jakub Jelinek wrote:
Hi!

r12-2601 has added this define_insn_and_split and corresponding
(define_insn ""
   [(set (reg:CCZ CC_REG)
        (eq (zero_extract:HSI (match_operand:HSI 0 "register_operand" "r")
                              (const_int 1)
                              (match_operand 1 "const_int_operand" "n"))
            (const_int 0)))]
   "INTVAL (operands[1]) < 16"
   "btst   %Z1,%Y0"
   [(set_attr "length" "2")])
pattern into which the define_insn_and_split wants to splut in addition
to a conditional jump.
But as can be seen, the btst define_insn uses HSI mode iterator while
define_insn_and_split QHSI, so for QImode it splits into something that
can't be recognized.

This was probably latent since r12-2601 and on the attached testcase
is reproduceable starting with r15-1945 - a late combiner change.

Untested except for the testcase with x86_64-linux -> h8300-elf cross.

Ok for trunk?

2025-04-09  Jakub Jelinek  <ja...@redhat.com>

        PR target/119664
        * config/h8300/jumpcall.md (bit test and jump define_insn_and_split):
        Use HSI iterator rather than QHSI.

        * gcc.dg/pr119664.c: New test.
OK. Not immediately sure why we don't support QI for the bit test, but given how dead the chip is, not terribly interested in chasing it down (until such time as doing so makes my tester run faster ;-)

It'll spin in my tester < 24hrs after commit. So figure if you haven't heard from me, it's working fine.

Jeff

Reply via email to