[Bug target/83969] [8 Regression] ICE in final_scan_insn, at final.c:2997 (error: could not split insn) for powerpc targets

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jan 22 20:07:00 GMT 2018


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-01-22
                 CC|                            |dje at gcc dot gnu.org,
                   |                            |jakub at gcc dot gnu.org,
                   |                            |segher at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The bug seems to be that the "Y" constraint is used in multiple places with
input_predicate, but many rtxes for which satisfies_constraint_Y returns true,
such as (mem:TI (plus:SI (reg:SI) (reg:SI))) do not satisfy input_operand
predicate.
In this case:
(define_insn "*mov<mode>_string"
  [(set (match_operand:TI2 0 "reg_or_mem_operand" "=Q,Y,????r,????r,????r,r")
        (match_operand:TI2 1 "input_operand" "r,r,Q,Y,r,n"))]
  "! TARGET_POWERPC64
   && (<MODE>mode != TImode || VECTOR_MEM_NONE_P (TImode))
   && (gpc_reg_operand (operands[0], <MODE>mode)
       || gpc_reg_operand (operands[1], <MODE>mode))"
  "#"
  [(set_attr "type" "store,store,load,load,*,*")
   (set_attr "update" "yes")
   (set_attr "indexed" "yes")
   (set_attr "cell_micro" "conditional")])
relies on the
(define_split
  [(set (match_operand:TI2 0 "nonimmediate_operand" "")
        (match_operand:TI2 1 "input_operand" ""))]
  "reload_completed
   && gpr_or_gpr_p (operands[0], operands[1])
   && !direct_move_p (operands[0], operands[1])
   && !quad_load_store_p (operands[0], operands[1])"
  [(pc)]
{ rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
splitter, but as RA doesn't use the predicates, just constraints, we can end up
with something that can't be split.

So, either mem_operand_gpr should fail if input_operand isn't true, or the
patterns using "Y" constraint or splitting what it does needs to use a
different predicate that would cover also expressions for which mem_operand_gpr
is true.


More information about the Gcc-bugs mailing list