Thu, 06 Jun 91 13:35:22 PDT

Related articles |
---|

Optimizing IEEE Floating-Point Operations daryl@hpclopt.cup.hp.com (1991-06-06) |

Re: Optimizing IEEE Floating-Point Operations bron@sgi.com (1991-06-11) |

Optimizing IEEE Floating-Point Operations bill@hcx2.SSD.CSD.HARRIS.COM (1991-06-14) |

Optimizing IEEE Floating-Point Operations eggert@twinsun.com (1991-06-14) |

Optimizing IEEE Floating-Point Operations cfarnum@valhalla.cs.wright.edu (1991-06-17) |

Re: Optimizing IEEE Floating-Point Operations henry@zoo.toronto.edu (1991-06-17) |

Re: Optimizing IEEE Floating-Point Operations bill@hcx2.ssd.csd.harris.com (1991-06-18) |

[1 later articles] |

Newsgroups: | comp.compilers |

From: | daryl@hpclopt.cup.hp.com |

Keywords: | arithmetic, design, Fortran, C |

Organization: | Hewlett-Packard, California Language Lab |

Date: | Thu, 06 Jun 91 13:35:22 PDT |

Suppose I have a program with the following statements:

x = 0.0; /* statement A */

y = y * x; /* statement B */

Let us assume that x and y are floating-point variables and that the

underlying machine uses the IEEE floating-point representation. Assuming

that we can determine that x does not change between A and B, should the

expression (y * x) in statement B be replaced with 0.0? What if y is a NaN?

(A constant propagation pattern like this occurs in the tomcatv SPEC

benchmark.)

The PA-RISC compilers do not currently perform this transformation because it

makes conservative assumptions about the programmer's desire to adhere to the

IEEE standard.

What do compilers from other vendors (besides HP) do by default? Are any

options provided to override the default? Does anyone have an opinion on

what the right thing to do is?

Thanks,

Daryl Odnert daryl@hpclopt.cup.hp.com

Hewlett-Packard

California Language Lab

[There currently is a heated argument in comp.arch on this point, with much of

the problem being that the IEEE FP standard and the various language standards

talk past each other, leaving large grey areas. -John]

--

Post a followup to this message

Return to the
comp.compilers page.

Search the
comp.compilers archives again.