diff options
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 27fdd5187bd..573e3d7b8cd 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -639,9 +639,9 @@ bool isExtractBitsCandidateUse(Instruction *User) { !isa<ConstantInt>(User->getOperand(1))) return false; - unsigned Cimm = dyn_cast<ConstantInt>(User->getOperand(1))->getZExtValue(); + const APInt &Cimm = cast<ConstantInt>(User->getOperand(1))->getValue(); - if (Cimm & (Cimm + 1)) + if ((Cimm & (Cimm + 1)).getBoolValue()) return false; } return true; |