[llvm] r274098 - [ValueTracking] Teach computeKnownBits for PHI nodes to compute sign bit for a recurrence with a NSW addition.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 23:33:52 PDT 2016


IR is here

http://pastebin.com/ESbCW6sV

It seems that even though there are both sext and zext, indvars decides the
IV is signed and refuses to remove any zexts.

~Craig

On Tue, Jun 28, 2016 at 11:27 PM, Sanjoy Das <sanjoy at playingwithpointers.com
> wrote:

> On Tue, Jun 28, 2016 at 10:55 PM, Craig Topper <craig.topper at gmail.com>
> wrote:
> > Early on in the pipeline my change caused a zext to feed the
> getelementptrs
> > instead of a sext. Later in Induction Variable Simplification a trunc was
> > added in front of the zext. Where as before the sext was completely
> removed.
>
> Do you have the IR before indvars was run?
>
> -- Sanjoy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160628/1d23afda/attachment.html>


More information about the llvm-commits mailing list