[PATCH] D37019: Add select simplifications

Michael Berg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 22 17:40:14 PDT 2017


mcberg2017 updated this revision to Diff 112272.
mcberg2017 added a comment.

So after looking in depth at SimplifyUsingDistributiveLaws, its pretty clear
that it is not safe when fast math is not available for the cases of
fadd/fsub/fmul.  So I have reverted the code to the first form, while placing
the fast math flag copies on instructions that might not fold, which 
should only happen rarely.  I also added a test case for fsub as well.


https://reviews.llvm.org/D37019

Files:
  lib/Transforms/InstCombine/InstCombineAddSub.cpp
  lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  test/Transforms/InstCombine/select_arithmetic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37019.112272.patch
Type: text/x-patch
Size: 5676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170823/8252e355/attachment.bin>


More information about the llvm-commits mailing list