[APInt] Use SignExtend64 instead of reinventing it. NFC

llvm-svn: 300747
This commit is contained in:
Craig Topper 2017-04-19 20:32:11 +00:00
parent e77d2b86b4
commit f0dd3c975c
1 changed files with 1 additions and 2 deletions

View File

@ -1433,8 +1433,7 @@ public:
/// int64_t. Otherwise an assertion will result.
int64_t getSExtValue() const {
if (isSingleWord())
return int64_t(VAL << (APINT_BITS_PER_WORD - BitWidth)) >>
(APINT_BITS_PER_WORD - BitWidth);
return SignExtend64(VAL, BitWidth);
assert(getMinSignedBits() <= 64 && "Too many bits for int64_t");
return int64_t(pVal[0]);
}