[PATCH] D37195: [InstCombine] Teach canEvaluateTruncated and EvaluateInDifferentType to handle expression tree with multi-used nodes.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 27 09:19:30 PDT 2017
craig.topper added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCasts.cpp:707
if ((DestTy->isVectorTy() || shouldChangeType(SrcTy, DestTy)) &&
- canEvaluateTruncated(Src, DestTy, *this, &CI)) {
+ canEvaluateTruncatedWrapper(Src, DestTy, *this, &CI)) {
----------------
I think a better way to name this is like this
canEvaluateTruncated->canEvaluateTruncatedImpl
canEvaluateTruncatedWrapper->canEvaluateTruncated
I think the Impl name will be more obvious that it shouldn't be called directly.
================
Comment at: test/Transforms/InstCombine/cast.ll:1370
+; Cases with truncate expression tree where not all nodes have a single usage.
+; However, all the nodes are dominated by the tranc instruction.
+; Case 1: same basic block
----------------
tranc->trunc
https://reviews.llvm.org/D37195
More information about the llvm-commits
mailing list