[PATCH] D87877: [InstCombine] Fix errno bug in pow expansion to sqrt
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 08:35:58 PDT 2020
hubert.reinterpretcast marked 2 inline comments as done.
hubert.reinterpretcast added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/pow-sqrt.ll:31
-; This makes no difference, but FMF are propagated.
+; This makes no difference, but FMF are propagated/retained.
----------------
spatel wrote:
> This comment should be more like above:
> ; The transform to sqrt is not allowed if we risk setting errno due to -INF.
>
> Although that raises a question: if the user has allowed an approximation of pow(), do they really expect that errno would be set accurately? Similarly, if they allowed 'reassoc'...
Given NaN propagation, if the `sqrt` was okay, then the result here should be NaN. That is, I think the question is more "can we just do the transform and omit the select"?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87877/new/
https://reviews.llvm.org/D87877
More information about the llvm-commits
mailing list