mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 06:27:16 +00:00
For PR1245:
Account for the sign bit when computing the number of bits required for a negative integer literal constant. llvm-svn: 35046
This commit is contained in:
parent
10a05b538d
commit
f860fd3370
@ -377,7 +377,7 @@ shufflevector { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
|
||||
}
|
||||
}
|
||||
{NInteger} { int len = strlen(yytext);
|
||||
uint32_t numBits = (((len-1) * 64) / 19) + 1;
|
||||
uint32_t numBits = (((len-1) * 64) / 19) + 2;
|
||||
APInt Tmp(numBits, yytext, len, 10);
|
||||
uint32_t minBits = Tmp.getMinSignedBits();
|
||||
if (minBits > 0 && minBits < numBits)
|
||||
|
Loading…
Reference in New Issue
Block a user