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: Jeff Law <law at redhat dot com>
- To: Graham Stott <graham dot stott at btinternet dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "rdsandiford at googlemail dot com" <rdsandiford at googlemail dot com>
- Date: Thu, 04 Jul 2013 11:32:41 -0600
- 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>
On 07/04/2013 04:04 AM, Graham Stott wrote:
Hi Jeff, Richard
We could possibly also use VRP to change signed division to unsigned division when dividing a
non-negative signed operand by a power of 2 because then the sign bit will be 0 and we could do
the division using logical shift right.
See simplify_div_or_mod_using_ranges.
jeff