Re: Compiler optimization of division and remainder

Dave Lloyd <dave@occl-cam.demon.co.uk>
2 Feb 1996 09:52:58 -0500

          From comp.compilers

Related articles
[5 earlier articles]
Re: Compiler optimization of division and remainder hbaker@netcom.com (1996-01-29)
Re: Compiler optimization of division and remainder Peter-Lawrence.Montgomery@cwi.nl (1996-01-29)
Re: Compiler optimization of division and remainder johnmce@world.std.com (1996-01-29)
Re: Compiler optimization of division and remainder michael.williams@armltd.co.uk (1996-01-29)
Re: Compiler optimization of division and remainder jgj@ssd.hcsc.com (1996-01-29)
Re: Compiler optimization of division and remainder dave@occl-cam.demon.co.uk (Dave Lloyd) (1996-01-29)
Re: Compiler optimization of division and remainder dave@occl-cam.demon.co.uk (Dave Lloyd) (1996-02-02)
| List of all articles for this month |

From: Dave Lloyd <dave@occl-cam.demon.co.uk>
Newsgroups: comp.compilers
Date: 2 Feb 1996 09:52:58 -0500
Organization: Compilers Central
References: 96-01-088 96-01-103
Keywords: arithmetic, optimize

Peter L. Montgomery wrote:
                For example, the code


                                if (x > y) {
                                        ...
                                } else if (x < y) {
                                        ...
                                }


                should generate only one compare, whatever the types of x and y.


Only on a flags machine - you can't do this on a Transputer for example.
----------------------------------------------------------------------
Dave Lloyd Email: Dave@occl-cam.demon.co.uk
Oxford and Cambridge Compilers Ltd Phone: (44) 1223 572074
55 Brampton Rd, Cambridge CB1 3HJ, UK
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.