R600/SI: Add global atomicrmw and
[oota-llvm.git] / test / CodeGen / AArch64 / arm64-bcc.ll
1 ; RUN: llc < %s -mtriple=arm64-apple-darwint  | FileCheck %s
2 ; Checks for conditional branch b.vs
3
4 ; Function Attrs: nounwind
5 define i32 @add(i32, i32) {
6 entry:
7   %2 = tail call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 %1)
8   %3 = extractvalue { i32, i1 } %2, 1
9   br i1 %3, label %6, label %4
10
11 ; <label>:4                                       ; preds = %entry
12   %5 = extractvalue { i32, i1 } %2, 0
13   ret i32 %5
14
15 ; <label>:6                                       ; preds = %entry
16   tail call void @llvm.trap()
17   unreachable
18 ; CHECK: b.vs
19 }
20
21 ; Function Attrs: nounwind readnone
22 declare { i32, i1 } @llvm.sadd.with.overflow.i32(i32, i32)
23
24 ; Function Attrs: noreturn nounwind
25 declare void @llvm.trap()
26