On Tue, Nov 17, 2015 at 06:35:36PM +0000, Wilco Dijkstra wrote: > Bernd Schmidt wrote: > > Sent: 17 November 2015 22:16 > > To: Wilco Dijkstra; gcc-patches@gcc.gnu.org > > Subject: Re: [PATCH 1/4][AArch64] Generalize CCMP support > > > > On 11/13/2015 05:02 PM, Wilco Dijkstra wrote: > > > * gcc/ccmp.c (expand_ccmp_expr): Extract cmp_code from return > > value > > > of > > > expand_ccmp_expr_1. > > > > I was trying to review this part of the patch in isolation and got very > confused > > because the patch also changes the return values of the ccmp target hooks, > > but does not update the documentation. > > > > In this file, return values are also underdocumented in function comments. > > I've updated the comments and documentation, see below. I hope it makes > sense now - returning rtx that computes the same value as the tree > expression > we're emitting is the most useful thing one can do. > > > Also, > > > > > + enum rtx_code cmp_code = GET_CODE (tmp); > > > > Lose the "enum". Elsewhere in the patch too. > > > > Other than that this part is probably fine (leaving the aarch64 part to > the > > appropriate maintainers), but please resubmit with these issues fixed. > > I removed the enum here and updated the other patches as well. > > Wilco > > 2015-11-18 Wilco Dijkstra <wdijk...@arm.com> > > * gcc/target.def (gen_ccmp_first): Update documentation. > (gen_ccmp_next): Likewise. > * gcc/doc/tm.texi (gen_ccmp_first): Update documentation. > (gen_ccmp_next): Likewise. > * gcc/ccmp.c (expand_ccmp_expr): Extract cmp_code from return value > of > expand_ccmp_expr_1. Improve comments. > * gcc/config/aarch64/aarch64.md (ccmp_and): Use if_then_else for > ccmp. > (ccmp_ior<mode>): Remove pattern. > (cmp<mode>): Remove expand. > (cmp): Globalize pattern. > (cstorecc4): Use cc_register. > (mov<mode>cc): Remove ccmp_cc_register check. > * gcc/config/aarch64/aarch64.c (aarch64_get_condition_code_1): > Simplify after removal of CC_DNE/* modes. > (aarch64_ccmp_mode_to_code): Remove. > (aarch64_print_operand): Remove 'K' case. Merge 'm' and 'M' cases. > In 'k' case use integer as condition. > (aarch64_nzcv_codes): Remove inverted cases. > (aarch64_code_to_ccmode): Remove. > (aarch64_gen_ccmp_first): Use cmp pattern directly. Return the > correct > comparison with CC register to be used in folowing CCMP/branch/CSEL. > (aarch64_gen_ccmp_next): Use previous comparison and mode in CCMP > pattern. Return the comparison with CC register. Invert conditions > when bitcode is OR. > * gcc/config/aarch64/aarch64-modes.def: Remove CC_DNE/* modes. > * gcc/config/aarch64/predicates.md (ccmp_cc_register): Remove.
Could you please repost this with the word-wrapping issues fixed. I can't apply it to my tree for review or to commit it on your behalf in the current form. Thanks, James