git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254416
91177308-0d34-0410-b5e6-
96231b3b80d8
}
bool LoopIdiomRecognize::isLegalStore(StoreInst *SI) {
+ // Don't touch volatile stores.
+ if (!SI->isSimple())
+ return false;
+
Value *StoredVal = SI->getValueOperand();
Value *StorePtr = SI->getPointerOperand();
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;