1 ; Test SystemZInstrInfo::AnalyzeBranch and SystemZInstrInfo::InsertBranch.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
5 declare void @foo() noreturn
7 ; Check a case where a separate branch is needed and where the original
8 ; order should be reversed.
9 define i32 @f1(i32 %a, i32 %b) {
12 ; CHECK: jl .L[[LABEL:.*]]
15 ; CHECK: brasl %r14, foo@PLT
17 %cmp = icmp ult i32 %a, %b
18 br i1 %cmp, label %callit, label %return
28 ; Same again with a fused compare and branch.
29 define i32 @f2(i32 %a) {
31 ; CHECK: cije %r2, 0, .L[[LABEL:.*]]
34 ; CHECK: brasl %r14, foo@PLT
36 %cmp = icmp eq i32 %a, 0
37 br i1 %cmp, label %callit, label %return