1 ; RUN: llc -march=mipsel -mcpu=mips32r6 -disable-mips-delay-filler < %s | FileCheck %s
2 ; RUN: llc -march=mips -mcpu=mips32r6 -disable-mips-delay-filler < %s -filetype=obj \
3 ; RUN: -o - | llvm-objdump -d - | FileCheck %s -check-prefix=ENCODING
4 ; RUN: llc -march=mipsel -mcpu=mips64r6 -disable-mips-delay-filler -target-abi=n64 < %s | FileCheck %s
5 ; RUN: llc -march=mips -mcpu=mips64r6 -disable-mips-delay-filler -target-abi=n64 < %s -filetype=obj \
6 ; RUN: -o - | llvm-objdump -d - | FileCheck %s -check-prefix=ENCODING
8 ; bnezc and beqzc have restriction that $rt != 0
14 %cmp = icmp eq i32 1, 1
15 br i1 %cmp, label %if.then, label %if.end
28 %cmp = icmp eq i32 0, 0
29 br i1 %cmp, label %if.then, label %if.end
38 ; We silently fixup cases where the register allocator or user has given us
39 ; an instruction with incorrect operands that is trivially acceptable.
40 ; beqc and bnec have the restriction that $rs < $rt.
42 define i32 @f2(i32 %a, i32 %b) {
44 ; ENCODING-NOT: beqc $5, $4
45 ; ENCODING-NOT: bnec $5, $4
47 %cmp = icmp eq i32 %b, %a
48 br i1 %cmp, label %if.then, label %if.end
61 %cmp = icmp eq i64 1, 1
62 br i1 %cmp, label %if.then, label %if.end
75 %cmp = icmp eq i64 0, 0
76 br i1 %cmp, label %if.then, label %if.end
85 ; We silently fixup cases where the register allocator or user has given us
86 ; an instruction with incorrect operands that is trivially acceptable.
87 ; beqc and bnec have the restriction that $rs < $rt.
89 define i64 @f5(i64 %a, i64 %b) {
91 ; ENCODING-NOT: beqc $5, $4
92 ; ENCODING-NOT: bnec $5, $4
94 %cmp = icmp eq i64 %b, %a
95 br i1 %cmp, label %if.then, label %if.end
104 define i32 @f6(i32 %a) {
106 ; CHECK: beqzc ${{[0-9]+}}, $BB
108 %cmp = icmp eq i32 %a, 0
109 br i1 %cmp, label %if.then, label %if.end
118 define i32 @f7(i32 %a) {
120 ; CHECK: bnezc ${{[0-9]+}}, $BB
122 %cmp = icmp eq i32 0, %a
123 br i1 %cmp, label %if.then, label %if.end