[PATCH] D68408: [InstCombine] Unfold `sub %x, %y` -> `add (sub 0, %y), %x` IFF `%y` can be freely negated

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 03:11:53 PDT 2019


lebedev.ri updated this revision to Diff 223181.
lebedev.ri added a comment.

Actually, `sub` can be freely negated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68408/new/

https://reviews.llvm.org/D68408

Files:
  llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
  llvm/lib/Transforms/InstCombine/InstCombineInternal.h
  llvm/test/Transforms/InstCombine/sub-of-negatible.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68408.223181.patch
Type: text/x-patch
Size: 10802 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191004/8131430d/attachment.bin>


More information about the llvm-commits mailing list