[PATCH] D30869: [JumpThread] We want to fold (not thread) when all predecessor go to single BB's successor. .
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 18 16:27:59 PDT 2017
sanjoy requested changes to this revision.
sanjoy added a comment.
This revision now requires changes to proceed.
Comments inline.
================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:1285
+ // If the predecessor ends with an indirect goto, we can't change its
+ // destination, so do not push it into the PredToDestList. However, it
+ // is still a predecessor with known successor target.
----------------
This logic looks like it isn't tested?
In any case, I'd suggest not putting it in this first patch, but doing it as an improvement on the fold-instead-of-threading logic.
================
Comment at: test/Transforms/JumpThreading/basic.ll:21
+L0:
+ call i32 @f2()
+ call i32 @f2()
----------------
Can you please add a test case with multiple preds of `L0`?
https://reviews.llvm.org/D30869
More information about the llvm-commits
mailing list