[LLVMdev] Integer divide by zero

Duncan Sands baldrick at free.fr
Sun Apr 7 08:22:55 PDT 2013


Hi Cameron,

On 06/04/13 22:52, Cameron McInally wrote:
> On Sat, Apr 6, 2013 at 3:22 PM, Jeff Bezanson <jeff.bezanson at gmail.com
> <mailto:jeff.bezanson at gmail.com>> wrote:
>
>     A division intrinsic with defined behavior on all arguments would be
>     awesome! Thanks for considering this.
>
>
> 'Tis a good compromise. If there are no objections/concerns, I would like to
> move forward with it.

can't front-ends implement this themselves using the "select" constant
expression?  For example, rather than dividing by "x" you can divide by
"x == 0 ? 1 : x".

Ciao, Duncan.



More information about the llvm-dev mailing list