Restrict scope of variables [NFC]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261250 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Philip Reames 2016-02-18 19:45:31 +00:00
parent 459d220c68
commit 1dddbb7106

View File

@ -99,9 +99,9 @@ bool AtomicExpand::runOnFunction(Function &F) {
assert((LI || SI || RMWI || CASI || isa<FenceInst>(I)) &&
"Unknown atomic instruction");
auto FenceOrdering = Monotonic;
bool IsStore, IsLoad;
if (TLI->getInsertFencesForAtomic()) {
auto FenceOrdering = Monotonic;
bool IsStore, IsLoad;
if (LI && isAtLeastAcquire(LI->getOrdering())) {
FenceOrdering = LI->getOrdering();
LI->setOrdering(Monotonic);