mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
no need to negate the APInt for 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61777 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
159c35b3ee
commit
b9f08a00af
@ -57,7 +57,7 @@ struct constantint_ty {
|
||||
bool match(ITy *V) {
|
||||
if (const ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
|
||||
const APInt &CIV = CI->getValue();
|
||||
if (Val > 0)
|
||||
if (Val >= 0)
|
||||
return CIV == Val;
|
||||
// If Val is negative, and CI is shorter than it, truncate to the right
|
||||
// number of bits. If it is larger, then we have to sign extend. Just
|
||||
|
Loading…
Reference in New Issue
Block a user