1 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -force-mips-long-branch | FileCheck %s
3 ; Check that when MIPS32R6 with the static relocation model with the usage of
4 ; long branches, that there is a nop between any compact branch and the static
5 ; relocation method of expanding branches. Previously, it could result in 'j'
6 ; following a b(ne|eq)zc, which would raise a reserved instruction exception.
16 define i32 @test1(i32 %a) {
18 %0 = icmp eq i32 %a, 0
19 br i1 %0, label %cond.true, label %cond.false
21 %1 = call i32 @f(i32 %a)
32 define i32 @test2(i32 %a) {
34 %0 = icmp sge i32 %a, 0
35 br i1 %0, label %cond.true, label %cond.false
37 %1 = call i32 @f(i32 %a)
48 define i32 @test3(i32 %a) {
50 %0 = icmp sle i32 %a, 0
51 br i1 %0, label %cond.true, label %cond.false
53 %1 = call i32 @f(i32 %a)
64 define i32 @test4(i32 %a) {
66 %0 = icmp sgt i32 %a, 0
67 br i1 %0, label %cond.true, label %cond.false
69 %1 = call i32 @f(i32 %a)
80 define i32 @test5(i32 %a) {
82 %0 = icmp slt i32 %a, 0
83 br i1 %0, label %cond.true, label %cond.false
85 %1 = call i32 @f(i32 %a)
96 define i32 @test6(i32 %a, i32 %b) {
98 %0 = icmp ugt i32 %a, %b
99 br i1 %0, label %cond.true, label %cond.false
101 %1 = call i32 @f(i32 %a)
108 ; CHECK-LABEL: test7:
112 define i32 @test7(i32 %a, i32 %b) {
114 %0 = icmp uge i32 %a, %b
115 br i1 %0, label %cond.true, label %cond.false
117 %1 = call i32 @f(i32 %a)
124 ; CHECK-LABEL: test8:
128 define i32 @test8(i32 %a, i32 %b) {
130 %0 = icmp ult i32 %a, %b
131 br i1 %0, label %cond.true, label %cond.false
133 %1 = call i32 @f(i32 %a)
140 ; CHECK-LABEL: test9:
144 define i32 @test9(i32 %a, i32 %b) {
146 %0 = icmp ule i32 %a, %b
147 br i1 %0, label %cond.true, label %cond.false
149 %1 = call i32 @f(i32 %a)