[llvm] r259649 - [DemandedBits] Revert r249687 due to PR26071

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 13:28:40 PST 2016


On Wed, Feb 3, 2016 at 7:05 AM, James Molloy via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: jamesm
> Date: Wed Feb  3 09:05:06 2016
> New Revision: 259649
>
> URL: http://llvm.org/viewvc/llvm-project?rev=259649&view=rev
> Log:
> [DemandedBits] Revert r249687 due to PR26071
>
> This regresses a test in LoopVectorize, so I'll need to go away and think about how to solve this in a way that isn't broken.
>
> From the writeup in PR26071:
>
> What's happening is that ComputeKnownZeroes is telling us that all bits except the LSB are zero. We're then deciding that only the LSB needs to be demanded from the icmp's inputs.
>
> This is where we're wrong - we're assuming that after simplification the bits that were known zero will continue to be known zero. But they're not - during trivialization the upper bits get changed (because an XOR isn't shrunk), so the icmp fails.
>
> The fault is in demandedbits - its contract does clearly state that a non-demanded bit may either be zero or one.
>
> Modified:
>     llvm/trunk/lib/Analysis/DemandedBits.cpp
>     llvm/trunk/test/Analysis/DemandedBits/basic.ll
>     llvm/trunk/test/Transforms/LoopVectorize/AArch64/loop-vectorization-factors.ll

Merged to 3.8 in r259699.


More information about the llvm-commits mailing list