<div dir="ltr"><div class="gmail_extra">Hey Owen,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks for your reply. I definitely understand your perspective. Hopefully I can change it.  }:-)<br><br><div class="gmail_quote">

On Sat, Apr 6, 2013 at 1:18 AM, Owen Anderson <span dir="ltr"><<a href="mailto:resistor@mac.com" target="_blank">resistor@mac.com</a>></span> wrote:<br><div>... </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"><div></div><div>As I've pointed out, clang does provide such functionality as an opt-in feature through its -fsanitize options.  A hypothetical Fortran frontend could do the same, and even make it an opt-out feature if it chose.  I'm sorry if its implementation mechanism doesn't match exactly what you want it to be, but it's not like nobody else has thought about this problem.  They have, and they've designed and shipped a solution!</div>

<div><br></div><div>Side note: even if the -fsanitize option introduces a branch around the division (which I haven't verified), it's quite unlikely to cause a significant performance regression.  The branch to the error block should be perfectly predicted on any CPU made in the last 25 years.</div>

<span><font color="#888888"><div><br></div></font></span></div></blockquote><div><br></div><div>Even on a Xeon Phi? Just kidding around!</div><div><br></div><div>All kidding aside, an instruction is an instruction. We have the functionality in hardware for free; it would be a shame not to use it. I should also mention that for our team, performance is job #1. Extra instructions, however insignificant, don't go over well without solid justification.</div>

<div><br></div><div>Please don't misunderstand, I'm not trying to be unreasonable about this behaviour change. I do believe that there are a few strong arguments for this behaviour that we haven't touched upon yet. I also believe that this option would be an improvement to LLVM overall. But, I also haven't heard anyone in the community voicing interest. So, if no one speaks up and would like to discuss further, I'll be happy to keep such a change in my local branch.</div>

<div><br></div><div>-Cameron</div></div></div></div>