mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[LIR] Push check into helper function. NFC.
llvm-svn: 254416
This commit is contained in:
parent
3e9d2bdddc
commit
ba78625193
@ -257,6 +257,10 @@ static unsigned getStoreStride(const SCEVAddRecExpr *StoreEv) {
|
||||
}
|
||||
|
||||
bool LoopIdiomRecognize::isLegalStore(StoreInst *SI) {
|
||||
// Don't touch volatile stores.
|
||||
if (!SI->isSimple())
|
||||
return false;
|
||||
|
||||
Value *StoredVal = SI->getValueOperand();
|
||||
Value *StorePtr = SI->getPointerOperand();
|
||||
|
||||
@ -287,10 +291,6 @@ void LoopIdiomRecognize::collectStores(BasicBlock *BB) {
|
||||
if (!SI)
|
||||
continue;
|
||||
|
||||
// Don't touch volatile stores.
|
||||
if (!SI->isSimple())
|
||||
continue;
|
||||
|
||||
// Make sure this is a strided store with a constant stride.
|
||||
if (!isLegalStore(SI))
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user