[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
Tue Aug 29 03:41:05 PDT 2017


aaboud marked 2 inline comments as done.
aaboud added a comment.

Thanks Craig for the comments.
Will upload an updated patch soon.



================
Comment at: lib/Transforms/InstCombine/InstCombineCasts.cpp:707
   if ((DestTy->isVectorTy() || shouldChangeType(SrcTy, DestTy)) &&
-      canEvaluateTruncated(Src, DestTy, *this, &CI)) {
+      canEvaluateTruncatedWrapper(Src, DestTy, *this, &CI)) {
 
----------------
craig.topper wrote:
> 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.
I thought to do that, but then tried to reduce the number of changed lines :)
I will update the patch accordingly.


https://reviews.llvm.org/D37195





More information about the llvm-commits mailing list