On 2/5/21 2:53 AM, YunQiang Su wrote:
> For MIPSr6, we may wish to use compact-branches only.
> Currently, we have to use `always' option, while it is mark as conflict
> with pre-R6.
> cc1: error: unsupported combination: ‘mips32r2’ -mcompact-branches=always
>
> It make some trouble for distributions to make -mcompact-branches=always
> default for R6 only.
>
> The new added `prefer' option:
> just ignored by pre-R6 target.
> do the same as `always' for R6+.
> ---
> gcc/config/mips/mips-opts.h | 3 ++-
> gcc/config/mips/mips.h | 6 ++++--
> gcc/config/mips/mips.opt | 3 +++
> gcc/doc/invoke.texi | 6 ++++++
> gcc/testsuite/gcc.target/mips/compact-branches-8.c | 10 ++++++++++
> gcc/testsuite/gcc.target/mips/compact-branches-9.c | 10 ++++++++++
> 6 files changed, 35 insertions(+), 3 deletions(-)
> create mode 100644 gcc/testsuite/gcc.target/mips/compact-branches-8.c
> create mode 100644 gcc/testsuite/gcc.target/mips/compact-branches-9.c
I think this will be OK once the wording in patch 2/3 of this series is
fixed.
It would be helpful if you could also include a ChangeLog entry.
Jeff