mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
Fix undefined behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151385 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9e931f6a64
commit
969b739fb9
@ -1234,7 +1234,7 @@ APInt APInt::lshr(const APInt &shiftAmt) const {
|
||||
/// @brief Logical right-shift function.
|
||||
APInt APInt::lshr(unsigned shiftAmt) const {
|
||||
if (isSingleWord()) {
|
||||
if (shiftAmt == BitWidth)
|
||||
if (shiftAmt >= BitWidth)
|
||||
return APInt(BitWidth, 0);
|
||||
else
|
||||
return APInt(BitWidth, this->VAL >> shiftAmt);
|
||||
|
Loading…
Reference in New Issue
Block a user