[PATCH] D11866: transform fmin/fmax calls when possible (PR24314)
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 8 10:38:29 PDT 2015
spatel created this revision.
spatel added reviewers: hfinkel, arsenm, jmolloy.
spatel added a subscriber: llvm-commits.
If we can ignore NaNs, fmin/fmax libcalls can become compare and select (this is what we turn std::min / std::max into).
This IR should then be optimized in the backend to whatever is best for any given target. Eg, x86 can use minss/maxss instructions.
This should solve PR24314:
https://llvm.org/bugs/show_bug.cgi?id=24314
http://reviews.llvm.org/D11866
Files:
include/llvm/Transforms/Utils/SimplifyLibCalls.h
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Transforms/InstCombine/fast-math.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11866.31583.patch
Type: text/x-patch
Size: 6529 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150808/6d81d9ba/attachment.bin>
More information about the llvm-commits
mailing list