This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: MIPS elimate trap-if-zero instruction if possible for divisions
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Graham Stott <graham dot stott at btinternet dot com>
- Cc: Jeff Law <law at redhat dot com>, "gcc-patches\ at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 09 Jul 2013 18:28:48 +0100
- Subject: Re: MIPS elimate trap-if-zero instruction if possible for divisions
- References: <1372858960 dot 88297 dot YahooMailNeo at web87404 dot mail dot ir2 dot yahoo dot com> <87ip0r1qwp dot fsf at talisman dot default> <51D463ED dot 5040503 at redhat dot com> <1372932273 dot 63021 dot YahooMailNeo at web87404 dot mail dot ir2 dot yahoo dot com> <1373382044 dot 89631 dot YahooMailNeo at web87404 dot mail dot ir2 dot yahoo dot com>
Graham Stott <graham.stott@btinternet.com> writes:
> Hi Richard, Jeff.
>
> Richard what's your idea for exposing things early enough so that VRP
> can eliminate the need for a trao-if-zero insn iif possible.
Well, I was thinking of doing it in expand. I.e. get the MIPS div*, mod*
and divmod* patterns to emit an explicit trap-if-zero or branch-around-
break sequence. (The div* and mod* patterns are in loongson.md.)
With Jeff's comment about VRP though, it sounds like he had different
ideas :-)
Richard