OLD | NEW |
1 ; Test parsing unreachable instruction. | 1 ; Test parsing unreachable instruction. |
2 | 2 |
3 ; REQUIRES: allow_dump | |
4 | |
5 ; RUN: %p2i -i %s --insts | FileCheck %s | 3 ; RUN: %p2i -i %s --insts | FileCheck %s |
6 ; RUN: %if --need=allow_disable_ir_gen --command \ | 4 ; RUN: %if --need=allow_disable_ir_gen --command \ |
7 ; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \ | 5 ; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \ |
8 ; RUN: | %if --need=allow_disable_ir_gen --command \ | 6 ; RUN: | %if --need=allow_disable_ir_gen --command \ |
9 ; RUN: FileCheck --check-prefix=NOIR %s | 7 ; RUN: FileCheck --check-prefix=NOIR %s |
10 | 8 |
11 define internal i32 @divide(i32 %num, i32 %den) { | 9 define internal i32 @divide(i32 %num, i32 %den) { |
12 entry: | 10 entry: |
13 %cmp = icmp ne i32 %den, 0 | 11 %cmp = icmp ne i32 %den, 0 |
14 br i1 %cmp, label %return, label %abort | 12 br i1 %cmp, label %return, label %abort |
(...skipping 11 matching lines...) Expand all Loading... |
26 ; CHECK-NEXT: %cmp = icmp ne i32 %den, 0 | 24 ; CHECK-NEXT: %cmp = icmp ne i32 %den, 0 |
27 ; CHECK-NEXT: br i1 %cmp, label %return, label %abort | 25 ; CHECK-NEXT: br i1 %cmp, label %return, label %abort |
28 ; CHECK-NEXT: abort: | 26 ; CHECK-NEXT: abort: |
29 ; CHECK-NEXT: unreachable | 27 ; CHECK-NEXT: unreachable |
30 ; CHECK-NEXT: return: | 28 ; CHECK-NEXT: return: |
31 ; CHECK-NEXT: %div = sdiv i32 %num, %den | 29 ; CHECK-NEXT: %div = sdiv i32 %num, %den |
32 ; CHECK-NEXT: ret i32 %div | 30 ; CHECK-NEXT: ret i32 %div |
33 ; CHECK-NEXT: } | 31 ; CHECK-NEXT: } |
34 | 32 |
35 ; NOIR: Total across all functions | 33 ; NOIR: Total across all functions |
OLD | NEW |