diff options
author | Chad Rosier <mcrosier@codeaurora.org> | 2015-12-01 14:26:35 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@codeaurora.org> | 2015-12-01 14:26:35 +0000 |
commit | 869962f962225c5bca7e02733871b8c6ef5d27a1 (patch) | |
tree | 49f08690115de07ada016ee95e49c92a8c652da5 | |
parent | 43aef4cb9bf7053a7f814fee124b2bbde9850578 (diff) | |
download | bcm5719-llvm-869962f962225c5bca7e02733871b8c6ef5d27a1.tar.gz bcm5719-llvm-869962f962225c5bca7e02733871b8c6ef5d27a1.zip |
[LIR] Push check into helper function. NFC.
llvm-svn: 254416
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp index a3658ed6497..9dc41ba2f32 100644 --- a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp +++ b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp @@ -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; |