mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 20:59:51 +00:00
Fix sext operation. Shifting by zero would leave an incorrect mask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34617 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9eec241347
commit
f30b1885ae
@ -889,7 +889,7 @@ void APInt::sext(uint32_t width) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint64_t mask = ~0ULL << wordBits;
|
||||
uint64_t mask = wordBits == 0 ? 0 : ~0ULL << wordBits;
|
||||
uint64_t *newVal = getMemory(wordsAfter);
|
||||
if (wordsBefore == 1)
|
||||
newVal[0] = VAL | mask;
|
||||
|
Loading…
Reference in New Issue
Block a user