This is the mail archive of the gcc-patches@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]

Re: [PATCH] Fix a bug in optimize_size -> optimize_function_for_s*_p i386.md conversion (PR target/37438)


> Hi!
> 
> Revision 139737 did:
> @@ -3703,7 +3713,8 @@ (define_insn "*zero_extendqihi2_movzbw_a
>  (define_insn "*zero_extendqihi2_movzbl"
>    [(set (match_operand:HI 0 "register_operand" "=r")
>       (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "qm")))]
> -  "(!TARGET_ZERO_EXTEND_WITH_AND || optimize_size) && reload_completed" 
> +  "(!TARGET_ZERO_EXTEND_WITH_AND || optimize_function_for_speed_p (cfun))
> +   && reload_completed"
>    "movz{bl|x}\t{%1, %k0|%k0, %1}"
>    [(set_attr "type" "imovx")
>     (set_attr "mode" "SI")]) 
> while all other i386.md changes look correct (change
> optimize_size to optimize_function_for_size_p (cfun) or
> optimize_insn_for_size_p () and !optimize_size to
> optimize_function_for_speed_p (cfun) or optimize_insn_for_speed_p ().
> That inverts the test and breaks the attached testcase.  Ok for trunk?

OK,
thanks for noticing this!

Honza


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