[LLVMbugs] [Bug 1816] APInt::countTrailingZeros(0) defined wrong

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Nov 23 14:44:27 PST 2007


http://llvm.org/bugs/show_bug.cgi?id=1816


Chris Lattner <sabre at nondot.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal
             Status|NEW                         |RESOLVED
           Keywords|                            |miscompilation
         Resolution|                            |FIXED
            Summary|APInt::countTrailingZeros() |APInt::countTrailingZeros(0)
                   |> APInt::getBitWidth()      |defined wrong
   Target Milestone|---                         |2.2




--- Comment #2 from Chris Lattner <sabre at nondot.org>  2007-11-23 16:44:27 ---
Fixed, patches here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071119/055773.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071119/055775.html

This bug actually manifested it as a miscompilation when constant folding
llvm.cttz also.  I verified that ctlz was already doing the right thing, even
though it was documented not to.

Thanks!

-Chris


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list