[APInt] Fix extractBits to correctly handle Result.isSingleWord() case.

Summary: extractBits assumes that `!this->isSingleWord() implies !Result.isSingleWord()`, which may not necessarily be true. Handle both cases.

Reviewers: RKSimon

Subscribers: sanjoy, llvm-commits, hiraditya

Differential Revision: https://reviews.llvm.org/D43363

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325311 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed