[PATCH] D21137: Instcombile min/max intrinsics calls

Karthik Bhat via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 23:40:52 PDT 2016


karthikthecool updated the summary for this revision.
karthikthecool removed rL LLVM as the repository for this revision.
karthikthecool updated this revision to Diff 60140.
karthikthecool added a comment.

Update the patch to handle NaN's.
As escha suggested the previous code will fail in case on NaN.
We will need  runtime checks to see if the value is NaN and select X or Y accordingly.

We eliminate 2 intinsic function call with a compare and select instruction.
Please let me know your valuable inputs on the same and if it requires any modifications.

Thanks and Regards
Karthik Bhat


http://reviews.llvm.org/D21137

Files:
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  test/Transforms/InstCombine/maxnum.ll
  test/Transforms/InstCombine/minnum.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21137.60140.patch
Type: text/x-patch
Size: 6754 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160609/1111875c/attachment.bin>


More information about the llvm-commits mailing list