[PATCH 4/8] [RS6000] rs6000_rtx_costs tidy break/return
Alan Modra
amodra@gmail.com
Thu Jan 21 23:09:34 GMT 2021
Ping.
On Tue, Jan 12, 2021 at 02:02:09PM +1030, Alan Modra wrote:
> Ping
> https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555755.html
>
> On Thu, Oct 08, 2020 at 09:27:56AM +1030, Alan Modra wrote:
> > Most cases use "return false" rather than breaking out of the switch.
> > Do so in all cases.
> >
> > * config/rs6000/rs6000.c (rs6000_rtx_costs): Tidy break/return.
> >
> > diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
> > index bc5e51aa5ce..383d2901c9f 100644
> > --- a/gcc/config/rs6000/rs6000.c
> > +++ b/gcc/config/rs6000/rs6000.c
> > @@ -21371,7 +21371,7 @@ rs6000_rtx_costs (rtx x, machine_mode mode, int outer_code,
> > *total = rs6000_cost->fp;
> > else
> > *total = rs6000_cost->dmul;
> > - break;
> > + return false;
> >
> > case DIV:
> > case MOD:
> > @@ -21539,7 +21539,7 @@ rs6000_rtx_costs (rtx x, machine_mode mode, int outer_code,
> > *total = rs6000_cost->fp;
> > return false;
> > }
> > - break;
> > + return false;
> >
> > case NE:
> > case EQ:
> > @@ -21577,13 +21577,11 @@ rs6000_rtx_costs (rtx x, machine_mode mode, int outer_code,
> > *total = 0;
> > return true;
> > }
> > - break;
> > + return false;
> >
> > default:
> > - break;
> > + return false;
> > }
> > -
> > - return false;
> > }
> >
> > /* Debug form of r6000_rtx_costs that is selected if -mdebug=cost. */
--
Alan Modra
Australia Development Lab, IBM
More information about the Gcc-patches
mailing list