https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119664

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2025-04-08
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |law at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Guess latent since r12-2601 , but it is actually late_combine2 that propagates
it.
There is a mismatch on the mode iterators introduced by that commit,
(define_insn_and_split ""
  [(set (pc)
        (if_then_else (match_operator 3 "eqne_operator"
                        [(zero_extract:QHSI (match_operand:QHSI 1
"register_operand" "r")
                                            (const_int 1)
                                            (match_operand 2
"const_int_operand" "n"))
                         (const_int 0)])
                      (label_ref (match_operand 0 "" ""))
                      (pc)))]
in jumpcall.md uses QHSI, but
(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)))]
in testcompare.md uses HSI.
--- gcc/config/h8300/jumpcall.md.jj     2021-08-30 08:36:11.044519071 +0200
+++ gcc/config/h8300/jumpcall.md        2025-04-08 13:11:03.643093722 +0200
@@ -146,9 +146,9 @@
 (define_insn_and_split ""
   [(set (pc)
        (if_then_else (match_operator 3 "eqne_operator"
-                       [(zero_extract:QHSI (match_operand:QHSI 1
"register_operand" "r")
-                                           (const_int 1)
-                                           (match_operand 2
"const_int_operand" "n"))
+                       [(zero_extract:HSI (match_operand:HSI 1
"register_operand" "r")
+                                          (const_int 1)
+                                          (match_operand 2 "const_int_operand"
"n"))
                         (const_int 0)])
                      (label_ref (match_operand 0 "" ""))
                      (pc)))]
@@ -156,7 +156,7 @@
   "#"
   "&& reload_completed"
   [(set (reg:CCZ CC_REG)
-       (eq (zero_extract:QHSI (match_dup 1) (const_int 1) (match_dup 2))
+       (eq (zero_extract:HSI (match_dup 1) (const_int 1) (match_dup 2))
            (const_int 0)))
    (set (pc)
        (if_then_else (match_op_dup 3 [(reg:CCZ CC_REG) (const_int 0)])
fixes this, but what do I know about h8300...

Reply via email to