[PATCH] D21284: Fold fmin(nnan x, inf) -> x, fmax(nnan x, -inf) -> x, fmax(nnan ninf x, -flt_max) -> x and fmin(nnan ninf x, flt_max) -> x

Karthik Bhat via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 06:03:48 PDT 2016


karthikthecool created this revision.
karthikthecool added reviewers: arsenm, majnemer.
karthikthecool added a subscriber: llvm-commits.
karthikthecool set the repository for this revision to rL LLVM.

Hi,
Implement few TODO's in InstCombineCalls.

This patch enables folding the following instructions-
fmin(nnan x, inf) -> x
fmax(nnan x, -inf) -> x

&

fmax(nnan ninf x, -flt_max) -> x
fmin(nnan ninf x, flt_max) -> x

Thanks
Karthik Bhat

Repository:
  rL LLVM

http://reviews.llvm.org/D21284

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: D21284.60508.patch
Type: text/x-patch
Size: 4990 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160613/9c137fd5/attachment.bin>


More information about the llvm-commits mailing list