[PATCH] D28314: Change sqrt partial inlining to depend on sqrt argument rather than result.

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 06:40:02 PST 2017


hfinkel added a comment.

In https://reviews.llvm.org/D28314#636754, @sdardis wrote:

> This change is increasing the branch density for MIPS in the supplied test case and register pressure, as LLVM now has to synthesise 0.0 into a floating point register. This in turn also decreases code density for MIPS as we can't load 0.0 in a single instruction like x86 in all cases.


I suspect that we need to use TTI here to pick the behavior here based on target preferences. What we want to know, I suspect, is: is a floating-point comparison against zero as cheap as, or cheaper than, a floating-point NaN test? -- We don't have an interface yet to make that query, but we could add one.


https://reviews.llvm.org/D28314





More information about the llvm-commits mailing list