[CodeGen] Fix AtomicExpand invalidation issue caused by r247429.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247514 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ahmed Bougacha 2015-09-12 18:51:23 +00:00
parent b43332c8d1
commit 3034c71409

View File

@ -505,8 +505,10 @@ bool AtomicExpand::isIdempotentRMW(AtomicRMWInst* RMWI) {
}
bool AtomicExpand::simplifyIdempotentRMW(AtomicRMWInst* RMWI) {
if (auto ResultingLoad = TLI->lowerIdempotentRMWIntoFencedLoad(RMWI))
return tryExpandAtomicLoad(ResultingLoad);
if (auto ResultingLoad = TLI->lowerIdempotentRMWIntoFencedLoad(RMWI)) {
tryExpandAtomicLoad(ResultingLoad);
return true;
}
return false;
}