[LLVMdev] SIV tests in LoopDependence Analysis, Sanjoy's patch

Preston Briggs preston.briggs at gmail.com
Mon May 14 17:41:16 PDT 2012


On Mon, May 14, 2012 at 5:06 PM, Nick Lewycky <nicholas at mxc.ca> wrote:

> One issue: don't use floating-point in LLVM. We want LLVM to behave the same
> on different computers, and practically that means avoiding floats. This
> code:
>
>    double TMUL = BM.sdiv(G).roundToDouble(true);
>    if (TMUL > 0) {
>      TL = fmax(TL, (-X).roundToDouble(true) / TMUL);
>
> from the RDIV test is not okay. You can use APFloat if you like, that's our
> soft-coded float library that produces reproducible results.

OK, thanks for the tip.
I'll fix it.

Preston




More information about the llvm-dev mailing list