mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
586b51e638
These checks already exist as asserts when creating the corresponding instruction. Anybody creating these instructions already need to take care to not break these checks. Move the checks for success/failure ordering in cmpxchg from the verifier to the LLParser and BitcodeReader plus an assert. Add some tests for cmpxchg ordering. The .bc files are created from the .ll files with an llvm-as with these checks disabled. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D102803
8 lines
201 B
LLVM
8 lines
201 B
LLVM
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
|
|
|
|
define void @f(i32* %a, i32 %b, i32 %c) {
|
|
; CHECK: invalid cmpxchg success ordering
|
|
%x = cmpxchg i32* %a, i32 %b, i32 %c unordered monotonic
|
|
ret void
|
|
}
|