http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433

--- Comment #22 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-04 10:37:48 
UTC ---
Digging deeper, both testcases (from comment #0 and comment #5) fail due to:

      enum machine_mode insn_mode
        = insn_data[(int) CODE_FOR_cmpstrnsi].operand[0].mode;

The insn_mode is determined as VOIDmode in both cases. The testcase from
comment #0 fails in expand_builtin_strcmp (builtins.c line 3825) and the
testcase from comment #5 fails in expand_builtin_strncmp (builtins.c line
3937).

The pattern is defined in a correct way:

(define_expand "cmpstrnsi"
  [(set (match_operand:SI 0 "register_operand")
    (compare:SI (match_operand:BLK 1 "general_operand")
            (match_operand:BLK 2 "general_operand")))
   (use (match_operand 3 "general_operand"))
   (use (match_operand 4 "immediate_operand"))]

Reply via email to