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][ARM] PR target/69161: Don't ignore mode when matching comparison operator in cstore-like patterns


Hi Kyrill,

> Ok for trunk?
> 
> 2016-01-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
> 
>     PR target/69161
>     * config/arm/predicates.md (arm_comparison_operator_mode):
>     New predicate.
>     * config/arm/arm.md (*mov_scc): Use arm_comparison_operator_mode
>     instead of arm_comparison_operator.
>     (*mov_negscc): Likewise.
>     (*mov_notscc): Likewise.
>     * config/arm/thumb2.md (*thumb2_mov_scc): Likewise.
>     (*thumb2_mov_negscc): Likewise.
>     (*thumb2_mov_negscc_strict_it): Likewise.
>     (*thumb2_mov_notscc): Likewise.
>     (*thumb2_mov_notscc_strict_it): Likewise.

Approved - please apply - but ...

> diff --git a/gcc/config/arm/predicates.md b/gcc/config/arm/predicates.md
> index c66c31d5c6047aa7decfe7e95d111d5fbf6fb52e..b8f09ab6b109f80abe2df08a8b7f954f521ec1bf 100644
> --- a/gcc/config/arm/predicates.md
> +++ b/gcc/config/arm/predicates.md
> @@ -341,6 +341,11 @@ (define_special_predicate "arm_comparison_operator"
>    (and (match_operand 0 "expandable_comparison_operator")
>         (match_test "maybe_get_arm_condition_code (op) != ARM_NV")))
>  
> +;; Likewise, but don't ignore the mode.
> +(define_predicate "arm_comparison_operator_mode"

Please could you extend the comment here to reference the PR.  That way
anyone reading this code who wonders why we need to have two versions of
the same predicate will be able understand what is happening.

Cheers
  Nick


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