1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[NFC] Fix "not used" warning

This commit is contained in:
Vitaly Buka 2021-04-26 22:09:10 -07:00
parent d45ba8e94a
commit 519ec0d9ab
2 changed files with 6 additions and 7 deletions

View File

@ -502,7 +502,6 @@ LoopIdiomRecognize::isLegalStore(StoreInst *SI) {
// are stored. A store of i32 0x01020304 can never be turned into a memset, // are stored. A store of i32 0x01020304 can never be turned into a memset,
// but it can be turned into memset_pattern if the target supports it. // but it can be turned into memset_pattern if the target supports it.
Value *SplatValue = isBytewiseValue(StoredVal, *DL); Value *SplatValue = isBytewiseValue(StoredVal, *DL);
Constant *PatternValue = nullptr;
// Note: memset and memset_pattern on unordered-atomic is yet not supported // Note: memset and memset_pattern on unordered-atomic is yet not supported
bool UnorderedAtomic = SI->isUnordered() && !SI->isSimple(); bool UnorderedAtomic = SI->isUnordered() && !SI->isSimple();
@ -515,10 +514,11 @@ LoopIdiomRecognize::isLegalStore(StoreInst *SI) {
CurLoop->isLoopInvariant(SplatValue)) { CurLoop->isLoopInvariant(SplatValue)) {
// It looks like we can use SplatValue. // It looks like we can use SplatValue.
return LegalStoreKind::Memset; return LegalStoreKind::Memset;
} else if (!UnorderedAtomic && HasMemsetPattern && !DisableLIRP::Memset && }
if (!UnorderedAtomic && HasMemsetPattern && !DisableLIRP::Memset &&
// Don't create memset_pattern16s with address spaces. // Don't create memset_pattern16s with address spaces.
StorePtr->getType()->getPointerAddressSpace() == 0 && StorePtr->getType()->getPointerAddressSpace() == 0 &&
(PatternValue = getMemSetPatternValue(StoredVal, DL))) { getMemSetPatternValue(StoredVal, DL)) {
// It looks like we can use PatternValue! // It looks like we can use PatternValue!
return LegalStoreKind::MemsetPattern; return LegalStoreKind::MemsetPattern;
} }

View File

@ -201,10 +201,9 @@ static void writeStringsAndOffsets(MCStreamer &Out, DWPStringPool &Strings,
} }
static uint64_t getCUAbbrev(StringRef Abbrev, uint64_t AbbrCode) { static uint64_t getCUAbbrev(StringRef Abbrev, uint64_t AbbrCode) {
uint64_t CurCode;
uint64_t Offset = 0; uint64_t Offset = 0;
DataExtractor AbbrevData(Abbrev, true, 0); DataExtractor AbbrevData(Abbrev, true, 0);
while ((CurCode = AbbrevData.getULEB128(&Offset)) != AbbrCode) { while (AbbrevData.getULEB128(&Offset) != AbbrCode) {
// Tag // Tag
AbbrevData.getULEB128(&Offset); AbbrevData.getULEB128(&Offset);
// DW_CHILDREN // DW_CHILDREN