Commit 2a96212a authored by Sanjay Patel's avatar Sanjay Patel
Browse files

[x86] fix fmaxnum/fminnum with nnan

With nnan, there's no need for the masked merge / blend
sequence (that probably costs much more than the min/max
instruction).

Somewhere between clang 5.0 and 6.0, we started producing
these intrinsics for fmax()/fmin() in C source instead of
libcalls or fcmp/select. The backend wasn't prepared for
that, so we regressed perf in those cases.

Note: it's possible that other targets have similar problems
as seen here. 

Noticed while investigating PR37403 and related bugs:
https://bugs.llvm.org/show_bug.cgi?id=37403

The IR FMF propagation cases still don't work. There's
a proposal that might fix those cases in D46563.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331992 91177308-0d34-0410-b5e6-96231b3b80d8
parent 88b5ce0e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment