summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AtomicExpandPass.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2016-02-18 19:45:31 +0000
committerPhilip Reames <listmail@philipreames.com>2016-02-18 19:45:31 +0000
commit367fdd990cc60141cf10fa306e219b3c455fb273 (patch)
tree9c1de0c40e811555d2f4e329f98eada4481670b7 /llvm/lib/CodeGen/AtomicExpandPass.cpp
parent95c95c350e48053f71d28446a879f9e5a787b5bd (diff)
downloadbcm5719-llvm-367fdd990cc60141cf10fa306e219b3c455fb273.tar.gz
bcm5719-llvm-367fdd990cc60141cf10fa306e219b3c455fb273.zip
Restrict scope of variables [NFC]
llvm-svn: 261250
Diffstat (limited to 'llvm/lib/CodeGen/AtomicExpandPass.cpp')
-rw-r--r--llvm/lib/CodeGen/AtomicExpandPass.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AtomicExpandPass.cpp b/llvm/lib/CodeGen/AtomicExpandPass.cpp
index d12fdb24698..88db509f007 100644
--- a/llvm/lib/CodeGen/AtomicExpandPass.cpp
+++ b/llvm/lib/CodeGen/AtomicExpandPass.cpp
@@ -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);
OpenPOWER on IntegriCloud