mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
Fixing -Wsign-compare warnings; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224337 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9e8621e99a
commit
51c2bdca72
@ -1492,7 +1492,8 @@ void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalObject *GV) const {
|
||||
|
||||
if (NumBits == 0) return; // 1-byte aligned: no need to emit alignment.
|
||||
|
||||
assert(NumBits < std::numeric_limits<unsigned>::digits &&
|
||||
assert(NumBits <
|
||||
static_cast<unsigned>(std::numeric_limits<unsigned>::digits) &&
|
||||
"undefined behavior");
|
||||
if (getCurrentSection()->getKind().isText())
|
||||
OutStreamer.EmitCodeAlignment(1u << NumBits);
|
||||
|
@ -74,7 +74,8 @@ struct DomainValue {
|
||||
|
||||
// Is domain available?
|
||||
bool hasDomain(unsigned domain) const {
|
||||
assert(domain < std::numeric_limits<unsigned>::digits &&
|
||||
assert(domain <
|
||||
static_cast<unsigned>(std::numeric_limits<unsigned>::digits) &&
|
||||
"undefined behavior");
|
||||
return AvailableDomains & (1u << domain);
|
||||
}
|
||||
|
@ -8577,7 +8577,8 @@ static SDValue PerformBFICombine(SDNode *N,
|
||||
unsigned InvMask = cast<ConstantSDNode>(N->getOperand(2))->getZExtValue();
|
||||
unsigned LSB = countTrailingZeros(~InvMask);
|
||||
unsigned Width = (32 - countLeadingZeros(~InvMask)) - LSB;
|
||||
assert(Width < std::numeric_limits<unsigned>::digits &&
|
||||
assert(Width <
|
||||
static_cast<unsigned>(std::numeric_limits<unsigned>::digits) &&
|
||||
"undefined behavior");
|
||||
unsigned Mask = (1u << Width) - 1;
|
||||
unsigned Mask2 = N11C->getZExtValue();
|
||||
|
Loading…
x
Reference in New Issue
Block a user