[PATCH] D65305: [InstCombine] remove flop from lerp patterns

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 16:02:29 PDT 2019


spatel created this revision.
spatel added reviewers: xbolva00, RKSimon, lebedev.ri.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.

(Y * (1.0 - Z)) + (X * Z) --> 
Y - (Y * Z) + (X * Z) -->
Y + Z * (X - Y)

This is part of solving:
https://bugs.llvm.org/show_bug.cgi?id=42716

Factoring eliminates an instruction, so that should be a good canonicalization. The potential conversion to FMA would be handled by the backend based on target capabilities.


https://reviews.llvm.org/D65305

Files:
  llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
  llvm/test/Transforms/InstCombine/fadd-fsub-factor.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65305.211847.patch
Type: text/x-patch
Size: 7271 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190725/55cde478/attachment.bin>


More information about the llvm-commits mailing list