]> granicus.if.org Git - llvm/commit
[APInt] Remove calls to clearUnusedBits from XorSlowCase and operator^=
authorCraig Topper <craig.topper@gmail.com>
Tue, 24 Jan 2017 02:10:15 +0000 (02:10 +0000)
committerCraig Topper <craig.topper@gmail.com>
Tue, 24 Jan 2017 02:10:15 +0000 (02:10 +0000)
commit6ca6b72830ad819823545efa45a0251df6df78a1
treea252ad6e3efd3dda64893504041ef1edd63a85d2
parent5e7aac4918b87ec81427d852f83951c80334f5d4
[APInt] Remove calls to clearUnusedBits from XorSlowCase and operator^=

Summary:
There's a comment in XorSlowCase that says "0^0==1" which isn't true. 0 xored with 0 is still 0. So I don't think we need to clear any unused bits here.

Now there is no difference between XorSlowCase and AndSlowCase/OrSlowCase other than the operation being performed

Reviewers: majnemer, MatzeB, chandlerc, bkramer

Reviewed By: MatzeB

Subscribers: chfast, llvm-commits

Differential Revision: https://reviews.llvm.org/D28986

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292873 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/APInt.cpp
unittests/ADT/APIntTest.cpp