This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/82089] emit_cstore sign-extends BImode result for STORE_FLAG_VALUE == 1


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

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> Say that in bfin.md, we redefine cstoresi4 in the following way:
> ... 
> (define_expand "cstoresi4"
>   [(set (match_operand:BI 0 "")
>         (match_operator:BI 1 "ordered_comparison_operator"
>                        [(match_operand:SI 2 "register_operand" "")
> 			(match_operand:SI 3 "reg_or_const_int_operand" "")]))]
>   "" {})
> ...
> 

Written to make it easy to reproduce this wrong-code bug encountered for target
gcn on branch gcn for this insn from gcn.md:
...
(define_insn "cstoresi4"
  [(set (match_operand:BI 0 "gcn_conditional_register_operand" "=cs,cs,cs,cs")
        (match_operator:BI 1 "gcn_compare_operator"
            [(match_operand:SI 2 "gcn_alu_operand" "SSA,SSA,SSB,SS")
             (match_operand:SI 3 "gcn_alu_operand" "SSA,SSK,SS ,SSB")]))]
  ""
  "@
   s_cmp%D1\t%2, %3
   s_cmpk%D1\t%2, %3
   s_cmp%D1\t%2, %3
   s_cmp%D1\t%2, %3"
  [(set_attr "type" "sopc,sopk,sopk,sopk")
   (set_attr "mode" "SI")])
...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]