commit | c68c2243dcb716bc117f41aa543ca8a41046df41 | [log] [tgz] |
---|---|---|
author | Reid Spencer <rspencer@reidspencer.com> | Sun Feb 25 19:26:01 2007 +0000 |
committer | Reid Spencer <rspencer@reidspencer.com> | Sun Feb 25 19:26:01 2007 +0000 |
tree | c0815024cb9479fc19a320483ed5c70d0173a880 | |
parent | 1fa3d9ef93578970b2e0506104b96c3ffaa42bcf [diff] |
Fix clearUnusedBits to not depend on "undefined behavior" of >> operator when the bit size is equal to the word size. This happens to work out okay on x86, but might not on other platforms. The change just detects when there are no bits to clear (because BitWidth is a multiple of the word size) and returns early. Also, move some comments from .cpp file into header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34602 91177308-0d34-0410-b5e6-96231b3b80d8