[PATCH] D12958: Refactor computeKnownBits alignment handling code
    Philip Reames via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Sep 22 16:01:02 PDT 2015
    
    
  
reames added inline comments.
================
Comment at: lib/Analysis/ValueTracking.cpp:1488
@@ -1487,3 @@
-    KnownOne.clearAllBits();
-    return;
-  }
----------------
apilipenko wrote:
> reames wrote:
> > I'm not sure that removing these returns is actually equivalent.  Does computeKnownBits guarantee to preserve any known bits on entry?  (I don't think so?)  If not, then letting these flow down into the generic code may loose information. 
> In all existing code paths computeKnownBits starts with cleared bits on both KnownZero and KnownOne. In my patch I just made it explicit by moving the lines which clear both bit sets before the code which handles aligned values. See line 1466.
I wasn't commenting on the movement of the clearing.  I was commenting on the removal of the return.  
http://reviews.llvm.org/D12958
    
    
More information about the llvm-commits
mailing list