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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 07:24:53 PST 2017


RKSimon added a comment.

In https://reviews.llvm.org/D28314#636840, @hfinkel wrote:

> 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.


Would a TTI isFastMaterializeConstant be enough (similar to what we have in FastISel)?


https://reviews.llvm.org/D28314





More information about the llvm-commits mailing list