xref: /aosp_15_r20/external/llvm/test/CodeGen/Mips/blez_bgez.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mipsel < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mips64el < %s | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test_blez:
5*9880d681SAndroid Build Coastguard Worker; CHECK: blez ${{[0-9]+}}, $BB
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdefine void @test_blez(i32 %a) {
8*9880d681SAndroid Build Coastguard Workerentry:
9*9880d681SAndroid Build Coastguard Worker  %cmp = icmp sgt i32 %a, 0
10*9880d681SAndroid Build Coastguard Worker  br i1 %cmp, label %if.then, label %if.end
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Workerif.then:
13*9880d681SAndroid Build Coastguard Worker  tail call void @foo1()
14*9880d681SAndroid Build Coastguard Worker  br label %if.end
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Workerif.end:
17*9880d681SAndroid Build Coastguard Worker  ret void
18*9880d681SAndroid Build Coastguard Worker}
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Workerdeclare void @foo1()
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test_bgez:
23*9880d681SAndroid Build Coastguard Worker; CHECK: bgez ${{[0-9]+}}, $BB
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Workerdefine void @test_bgez(i32 %a) {
26*9880d681SAndroid Build Coastguard Workerentry:
27*9880d681SAndroid Build Coastguard Worker  %cmp = icmp slt i32 %a, 0
28*9880d681SAndroid Build Coastguard Worker  br i1 %cmp, label %if.then, label %if.end
29*9880d681SAndroid Build Coastguard Worker
30*9880d681SAndroid Build Coastguard Workerif.then:
31*9880d681SAndroid Build Coastguard Worker  tail call void @foo1()
32*9880d681SAndroid Build Coastguard Worker  br label %if.end
33*9880d681SAndroid Build Coastguard Worker
34*9880d681SAndroid Build Coastguard Workerif.end:
35*9880d681SAndroid Build Coastguard Worker  ret void
36*9880d681SAndroid Build Coastguard Worker}
37