diff options
| -rw-r--r-- | llvm/lib/CodeGen/AtomicExpandPass.cpp | 4 |
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); |

