[PATCH] D19073: [ValueTracking] Improve isImpliedCondition for conditions with matching LHS operands and Immediate RHS operands.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 12:53:56 PDT 2016


mcrosier added a comment.

In http://reviews.llvm.org/D19073#400372, @haicheng wrote:

> I think LazyValueInfo can figure out the branch direction in your test cases and then JumpThreading can optimize the CFG.


Correct!  Regardless, enabling this type of optimization in SimplifyCFG is worth while because SimplifyCFG is called much more frequently then Jump Threading.  This has the potential to expose more opportunities later in the pipeline.  It can also remove unreachable code earlier in the pipeline, which can save some compile time because we no longer analyze unreachable code.  Once http://reviews.llvm.org/D18905 I was hoping to make a change to make SimplifyCFG that would catch a lot more cases.

The unfortunately part is that I don't think I can easily reuse the logic in LVI here.


http://reviews.llvm.org/D19073





More information about the llvm-commits mailing list