e45cf47923
Always read bitcode according to the -opaque-pointers mode. Do not perform auto-detection to implicitly switch to typed pointers. This is a step towards removing typed pointer support, and also eliminates the class of problems where linking may fail if a typed pointer module is loaded before an opaque pointer module. (The latest place where this was encountered is D139924, but this has previously been fixed in other places doing bitcode linking as well.) Differential Revision: https://reviews.llvm.org/D139940
17 lines
527 B
LLVM
17 lines
527 B
LLVM
; RUN: llvm-dis < %s.bc | FileCheck %s
|
|
; RUN: verify-uselistorder < %s.bc
|
|
|
|
; cmpxchg-upgrade.ll.bc was produced by running a version of llvm-as from just
|
|
; before the IR change on this file.
|
|
|
|
define i32 @test(i32* %addr, i32 %old, i32 %new) {
|
|
; CHECK: [[TMP:%.*]] = cmpxchg ptr %addr, i32 %old, i32 %new seq_cst monotonic
|
|
; CHECK: %val = extractvalue { i32, i1 } [[TMP]], 0
|
|
%val = cmpxchg i32* %addr, i32 %old, i32 %new seq_cst monotonic
|
|
ret i32 %val
|
|
}
|
|
|
|
define i32 @test(i32* %addr, i32 %old, i32 %new) {
|
|
ret i1 %val
|
|
}
|