Division by zero
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Fri Oct 3 08:59:10 PDT 2014
"David Nadlinger" wrote in message
news:tqzutmhsvqtjskwvtixq at forum.dlang.org...
> 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…
That's annoying, but I guess it makes sense given how much division varies
across platforms.
More information about the Digitalmars-d
mailing list