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) {