1; RUN: llvm-as %s -o - | llvm-dis | FileCheck %s
2
3; Make sure that we can parse an atomicrmw with an operand defined later in the function.
4
5; CHECK: @f
6; CHECK: atomicrmw
7define void @f() {
8  entry:
9    br label %def
10
11  use:
12    %x = atomicrmw add i32* undef, i32 %y monotonic
13    ret void
14
15  def:
16    %y = add i32 undef, undef
17    br i1 undef, label %use, label %use
18}
19