Division by zero

David Nadlinger via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 3 08:09:32 PDT 2014


On Friday, 3 October 2014 at 14:54:17 UTC, Daniel Murphy wrote:
> https://issues.dlang.org/show_bug.cgi?id=5908

By the way, this (just emitting an x86 idiv even if it the 
operands are known to trap) will likely be a pain to implement 
for LDC. There has been an (overly aggressive, on the side of two 
LLVM devs) discussion about this a year ago or so: 
http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-April/060930.html.

Personally, I find their stance highly troublesome, as they have 
introduced undefined behavior that is hard to circumvent for 
practically no potential performance gain. I just hope we can 
somehow avoid emitting a branch on every integer division…

Cheers,
David


More information about the Digitalmars-d mailing list