[PATCH] Infer known bits from dominating conditions

James Molloy james at jamesmolloy.co.uk
Mon Mar 30 08:48:02 PDT 2015


Hi Philip,

Slightly late to the party here, but I think this work might help fix
PR23067.

In PR23067, BasicAA needs to know if a value is known non-zero or not. In
the example code, the value is known non-zero by virtue of the dominating
condition. However, IsKnownNonZero just calls calculateKnownBits. Your
dominance stuff will be able to know that all bits cannot be zero, but that
information is lost because any bit could be set or unset.

Is there a plan, or what would be the easiest way, of extending your change
so that isKnownNonZero would get the right information from a dominating
condition?

Cheers,

James

On Tue, 10 Mar 2015 at 23:17 Philip Reames <listmail at philipreames.com>
wrote:

> REPOSITORY
>   rL LLVM
>
> http://reviews.llvm.org/D7708
>
> Files:
>   llvm/trunk/lib/Analysis/ValueTracking.cpp
>   llvm/trunk/test/Transforms/InstCombine/dom-conditions.ll
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150330/5accd229/attachment.html>


More information about the llvm-commits mailing list