[PATCH] D37616: [X86] PR34149 Suboptimal codegen for fast minnum and maxnum.

Jatin Bhateja via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 9 10:12:06 PDT 2017


jbhateja added a comment.

In https://reviews.llvm.org/D37616#865418, @spatel wrote:

> I might be missing some context here. If we have fast/nnan on these calls, then can't we simplify this in IR to fmp+select and not have to deal with this in the backend? The intrinsics only exist to make sure that NaN behavior in IR meets the higher level standards, so if we have nnan, then we don't need the intrinsic?


Intrinsic function defer code geneation/expansion to backend this give backend control over geneating efficient code as per specific target. As of now SelectionDAGBuilder boils down intrinsic call to fminnum (or fminnan if target supports it and nnan is true) which is then handled by different targets differently.


https://reviews.llvm.org/D37616





More information about the llvm-commits mailing list