OLD | NEW |
1 ; Tests for conditional branch instructions | 1 ; Tests for conditional branch instructions |
2 | 2 |
3 ; RUN: %if --need=allow_dump --need=target_MIPS32 --command %p2i \ | 3 ; RUN: %if --need=allow_dump --need=target_MIPS32 --command %p2i \ |
4 ; RUN: --filetype=asm --target mips32 -i %s --args -O2 --skip-unimplemented \ | 4 ; RUN: --filetype=asm --target mips32 -i %s --args -O2 \ |
5 ; RUN: -allow-externally-defined-symbols \ | 5 ; RUN: -allow-externally-defined-symbols \ |
6 ; RUN: | %if --need=allow_dump --need=target_MIPS32 --command FileCheck %s \ | 6 ; RUN: | %if --need=allow_dump --need=target_MIPS32 --command FileCheck %s \ |
7 ; RUN: --check-prefix=COMMON --check-prefix=MIPS32 | 7 ; RUN: --check-prefix=COMMON --check-prefix=MIPS32 |
8 | 8 |
9 ; RUN: %if --need=allow_dump --need=target_MIPS32 --command %p2i \ | 9 ; RUN: %if --need=allow_dump --need=target_MIPS32 --command %p2i \ |
10 ; RUN: --filetype=asm --target mips32 -i %s --args -Om1 --skip-unimplemented \ | 10 ; RUN: --filetype=asm --target mips32 -i %s --args -Om1 \ |
11 ; RUN: -allow-externally-defined-symbols \ | 11 ; RUN: -allow-externally-defined-symbols \ |
12 ; RUN: | %if --need=allow_dump --need=target_MIPS32 --command FileCheck %s \ | 12 ; RUN: | %if --need=allow_dump --need=target_MIPS32 --command FileCheck %s \ |
13 ; RUN: --check-prefix=COMMON --check-prefix=MIPS32-OM1 | 13 ; RUN: --check-prefix=COMMON --check-prefix=MIPS32-OM1 |
14 | 14 |
15 define internal i32 @cond_br_eq(i32 %arg1, i32 %arg2) { | 15 define internal i32 @cond_br_eq(i32 %arg1, i32 %arg2) { |
16 entry: | 16 entry: |
17 %cmp1 = icmp eq i32 %arg1, %arg2 | 17 %cmp1 = icmp eq i32 %arg1, %arg2 |
18 br i1 %cmp1, label %branch1, label %branch2 | 18 br i1 %cmp1, label %branch1, label %branch2 |
19 branch1: | 19 branch1: |
20 ret i32 1 | 20 ret i32 1 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 ret i32 2 | 178 ret i32 2 |
179 } | 179 } |
180 ; COMMON-LABEL: cond_br_ule | 180 ; COMMON-LABEL: cond_br_ule |
181 ; MIPS32: sltu | 181 ; MIPS32: sltu |
182 ; MIPS32: bnez {{.*}} .Lcond_br_ule$branch2 | 182 ; MIPS32: bnez {{.*}} .Lcond_br_ule$branch2 |
183 ; MIPS32-NEXT: .Lcond_br_ule$branch1 | 183 ; MIPS32-NEXT: .Lcond_br_ule$branch1 |
184 ; MIPS32-OM1: sltu | 184 ; MIPS32-OM1: sltu |
185 ; MIPS32-OM1: xori {{.*}}, {{.*}}, 1 | 185 ; MIPS32-OM1: xori {{.*}}, {{.*}}, 1 |
186 ; MIPS32-OM1: beqz {{.*}} .Lcond_br_ule$branch2 | 186 ; MIPS32-OM1: beqz {{.*}} .Lcond_br_ule$branch2 |
187 ; MIPS32-OM1-NEXT: b .Lcond_br_ule$branch1 | 187 ; MIPS32-OM1-NEXT: b .Lcond_br_ule$branch1 |
OLD | NEW |