Karl Meakin <karl.mea...@arm.com> writes: > Make the formatting of the RTL templates in the rules for branch > instructions more consistent with each other.
One source of variation is the 80-character limit. It's a bit of a soft limit for rtl, but it is still good to keep to it where that's easy. So... > > gcc/ChangeLog: > > * config/aarch64/aarch64.md (cbranch<mode>4): reformat. > (cbranchcc4): likewise. > (condjump): likewise. > (*compare_condjump<GPI:mode>): likewise. > (aarch64_cb<optab><mode>1): likewise. > (*cb<optab><mode>1): likewise. > (tbranch_<code><mode>3): likewise. > (@aarch64_tb<optab><ALLI:mode><GPI:mode>): likewise. > --- > gcc/config/aarch64/aarch64.md | 82 ++++++++++++++++++----------------- > 1 file changed, 42 insertions(+), 40 deletions(-) > > [...] > @@ -717,34 +717,34 @@ (define_expand "cbranch<mode>4" > ) > > (define_expand "cbranch<mode>4" > - [(set (pc) (if_then_else > - (match_operator 0 "aarch64_comparison_operator" > - [(match_operand:GPF_F16 1 "register_operand") > - (match_operand:GPF_F16 2 "aarch64_fp_compare_operand")]) > - (label_ref (match_operand 3 "" "")) > - (pc)))] > + [(set (pc) (if_then_else (match_operator 0 "aarch64_comparison_operator" > + [(match_operand:GPF_F16 1 "register_operand") > + (match_operand:GPF_F16 2 > "aarch64_fp_compare_operand")]) > + (label_ref (match_operand 3)) > + (pc)))] ...for this one, the reformatting is making a line longer than 80 characters. I think it'd be better to keep the original. > @@ -807,9 +807,10 @@ (define_insn_and_split "*compare_condjump<GPI:mode>" > ) > > (define_insn "aarch64_cb<optab><mode>1" > - [(set (pc) (if_then_else (EQL (match_operand:GPI 0 "register_operand" "r") > - (const_int 0)) > - (label_ref (match_operand 1 "" "")) > + [(set (pc) (if_then_else (EQL > + (match_operand:GPI 0 "register_operand" "r") > + (const_int 0)) > + (label_ref (match_operand 1)) > (pc)))] I suppose this is personal perference, but it's IMO better not to break after something short like EQL, if the break-free form would also fit in 80 characters. So I'd slightly prefer going the other way, and avoiding a break after the condition if the break isn't needed for line-length purposes. Thanks, Richard