summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-25 19:26:01 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-25 19:26:01 +0000
commita7bd1d0b04004df926bfaeccc291a727ca5ce693 (patch)
treef02eb2ce33f441dff9fae49b7ee7ecf7bf332651 /llvm/lib/Support/APInt.cpp
parent84ab9a556c6c720bfa9fd5881454a272de6c3d65 (diff)
downloadbcm5719-llvm-a7bd1d0b04004df926bfaeccc291a727ca5ce693.tar.gz
bcm5719-llvm-a7bd1d0b04004df926bfaeccc291a727ca5ce693.zip
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. llvm-svn: 34602
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud