[llvm-dev] Comparing results of math function calls
Dávid Bolvanský via llvm-dev
llvm-dev at lists.llvm.org
Wed May 23 16:54:28 PDT 2018
+ Does LLVM marks values with an attribute like "value cannot be
NaN/INFINITY"?
2018-05-24 1:48 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>:
> Hello,
>
> Code:
>
> int f1(int a, int b) {
> return sqrt(a) > sqrt(b);
> }
>
> int f2(int a, int b) {
> return a > b;
> }
>
> Possibly, under -ffast-math (to ignore NaNs), f1 could be transformed to
> f2 variant.
>
> Also a transformation could support sin and tan, and reverse
> comparison for cos.
>
> Suggestions?
>
> Thanks
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180524/e31cc837/attachment.html>
More information about the llvm-dev
mailing list