[llvm-commits] Patch: Floating point optimizations for SimplifyInstruction

Michael Ilseman milseman at apple.com
Tue Dec 4 15:19:36 PST 2012


Attached is a patch adding some floating-point optimizations to SimplifyInstruction, some of which take advantage of fast-math flags. Test cases included.

The optimizations themselves:
  fsub X, 0 ==> X

  fsub 0, (fsub 0, X) ==> X

  fadd nsz X, 0 ==> X

  fadd [nnan ninf] X, (fsub [nnan ninf] 0, X) ==> 0
    where nnan and ninf have to occur at least once somewhere in this expression

  fsub nnan ninf x, x ==> 0.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-a-slew-of-SimplifyInstruction-floating-point-o.patch
Type: application/octet-stream
Size: 9860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121204/ea3bd8e0/attachment.obj>


More information about the llvm-commits mailing list