From c3d3598425b5af392691b740dbe407b10605d839 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 19 Sep 2011 19:41:28 +0000 Subject: [PATCH] Fix a typo in the bitcode reader in the handling of atomic stores. Reported by David Meyer on llvmdev. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140040 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bitcode/Reader/BitcodeReader.cpp | 2 +- test/Assembler/atomic.ll | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 148f74808a2..ca903151629 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -2653,7 +2653,7 @@ bool BitcodeReader::ParseFunctionBody(Function *F) { return Error("Invalid STOREATOMIC record"); AtomicOrdering Ordering = GetDecodedOrdering(Record[OpNum+2]); - if (Ordering == NotAtomic || Ordering == Release || + if (Ordering == NotAtomic || Ordering == Acquire || Ordering == AcquireRelease) return Error("Invalid STOREATOMIC record"); SynchronizationScope SynchScope = GetDecodedSynchScope(Record[OpNum+3]); diff --git a/test/Assembler/atomic.ll b/test/Assembler/atomic.ll index fa6f1f40e09..b245cdea75b 100644 --- a/test/Assembler/atomic.ll +++ b/test/Assembler/atomic.ll @@ -1,4 +1,4 @@ -; RUN: opt -S < %s | FileCheck %s +; RUN: opt < %s | opt -S | FileCheck %s ; Basic smoke test for atomic operations. define void @f(i32* %x) {