summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CodeGen.cpp
diff options
context:
space:
mode:
authorNikolai Bozhenov <nikolai.bozhenov@intel.com>2017-06-28 09:26:20 +0000
committerNikolai Bozhenov <nikolai.bozhenov@intel.com>2017-06-28 09:26:20 +0000
commitb01e6b5a521120626368d9b8999fde67c45055c8 (patch)
treeef1b039415d7dd53e2a647cfec4db40d28f85fb4 /llvm/lib/CodeGen/CodeGen.cpp
parent4ec1bb6f39163b3b799ee59e16c65bfbf5b4586d (diff)
downloadbcm5719-llvm-b01e6b5a521120626368d9b8999fde67c45055c8.tar.gz
bcm5719-llvm-b01e6b5a521120626368d9b8999fde67c45055c8.zip
[InstCombine] Canonicalize clamp of float types to minmax in fast mode.
Summary: This commit allows matchSelectPattern to recognize clamp of float arguments in the presence of FMF the same way as already done for integers. This case is a little different though. With integers, given the min/max pattern is recognized, DAGBuilder starts selecting MIN/MAX "automatically". That is not the case for float, because for them only full FMINNAN/FMINNUM/FMAXNAN/FMAXNUM ISD nodes exist and they do care about NaNs. On the other hand, some backends (e.g. X86) have only FMIN/FMAX nodes that do not care about NaNS and the former NAN/NUM nodes are illegal thus selection is not happening. So I decided to do such kind of transformation in IR (InstCombiner) instead of complicating the logic in the backend. Reviewers: spatel, jmolloy, majnemer, efriedma, craig.topper Reviewed By: efriedma Subscribers: hiraditya, javed.absar, n.bozhenov, llvm-commits Patch by Andrei Elovikov <andrei.elovikov@intel.com> Differential Revision: https://reviews.llvm.org/D33186 llvm-svn: 306525
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud