[PATCH] D37195: [InstCombine] Teach canEvaluateTruncated and EvaluateInDifferentType to handle expression tree with multi-used nodes.
Amjad Aboud via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 27 08:30:30 PDT 2017
aaboud created this revision.
Added support for patterns like this: http://rise4fun.com/Alive/85d
Where truncate expression contains nodes with multi usages, however all these usages are dominated by the same truncate instruction.
Solution: Instead of returning false when hitting such a node with more than one usage, simply record all the usages that were not visited yet, so they can be checked later against all visited nodes.
https://reviews.llvm.org/D37195
Files:
lib/Transforms/InstCombine/InstCombineCasts.cpp
lib/Transforms/InstCombine/InstCombineInternal.h
test/Transforms/InstCombine/cast.ll
test/Transforms/InstCombine/pr33765.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37195.112828.patch
Type: text/x-patch
Size: 11549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170827/d7908e9a/attachment.bin>
More information about the llvm-commits
mailing list