[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
Wed Apr 13 14:04:16 PDT 2016


mcrosier created this revision.
mcrosier added reviewers: sanjoy, reames, mssimpso, gberry.
mcrosier added a subscriber: llvm-commits.

This patch improves SimplifyCFG to catch things like:

if (a > 5) {
  if (a > 4) <- known to be true; remove branch
    alive();
}

and

if (a > 5) {
  if (a < 4) <- known to be false; remove branch and call
    dead();
}

This is very similar to (and has a dependency on) http://reviews.llvm.org/D18905.

Please take a look,
  Chad

http://reviews.llvm.org/D19073

Files:
  lib/Analysis/ValueTracking.cpp
  test/Transforms/SimplifyCFG/implied-cond-imm.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19073.53617.patch
Type: text/x-patch
Size: 10098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160413/7453835d/attachment.bin>


More information about the llvm-commits mailing list