Issue |
157902
|
Summary |
[LLVM] IR optimizer fails to add LLVM nnan attribute to fcmp where both values are known to be non-NaN
|
Labels |
new issue
|
Assignees |
|
Reporter |
johnplatts
|
Here is an snippet demonstrating that the LLVM IR optimizer fails to add nnan attribute to fcmp where both values are known to be non-NaN: https://alive2.llvm.org/ce/z/idmHeF
Adding the nnan attribute to fcmp when both values are known to be non-NaN, either because of a branch based on a fcmp or llvm.is.fpclass result that is only true for a non-NaN value or because the value is a constant non-NaN floating point value, does improve codegen on x86 as demonstrated by this snippet.
There are some further optimizations that can be applied to the snippet above, including snippets at the following URLs:
- https://alive2.llvm.org/ce/z/YwbRw2
- https://alive2.llvm.org/ce/z/xr62uT
- https://alive2.llvm.org/ce/z/nY7Jpj
- https://alive2.llvm.org/ce/z/P65vHS
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs