llvm-project/llvm/test/Bitcode/cmpxchg.3.6.ll
Nikita Popov e45cf47923 [Bitcode] Remove auto-detection for typed pointers
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
2022-12-14 13:38:20 +01:00

14 lines
274 B
LLVM

; RUN: llvm-dis < %s.bc | FileCheck %s
define void @f2(i32* %x, i32 %y.orig, i32 %z) {
entry:
br label %a
b:
cmpxchg i32* %x, i32 %y, i32 %z acquire acquire
; CHECK: cmpxchg ptr %x, i32 %y, i32 %z acquire acquire
ret void
a:
%y = add i32 %y.orig, 1
br label %a
}