OLD | NEW |
1 ; RUIN: %llvm2ice %s | FileCheck %s | 1 ; This tests a switch statement, including multiple branches to the |
2 ; RUIN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s | 2 ; same label which also results in phi instructions with multiple |
| 3 ; entries for the same incoming edge. |
| 4 |
| 5 ; RUN: %llvm2ice --verbose inst %s | FileCheck %s |
| 6 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
3 ; RUN: %szdiff --llvm2ice=%llvm2ice %s | FileCheck --check-prefix=DUMP %s | 7 ; RUN: %szdiff --llvm2ice=%llvm2ice %s | FileCheck --check-prefix=DUMP %s |
4 | 8 |
5 define i32 @testSwitch(i32 %a) { | 9 define i32 @testSwitch(i32 %a) { |
6 entry: | 10 entry: |
7 switch i32 %a, label %sw.default [ | 11 switch i32 %a, label %sw.default [ |
8 i32 1, label %sw.epilog | 12 i32 1, label %sw.epilog |
9 i32 2, label %sw.epilog | 13 i32 2, label %sw.epilog |
10 i32 3, label %sw.epilog | 14 i32 3, label %sw.epilog |
11 i32 7, label %sw.bb1 | 15 i32 7, label %sw.bb1 |
12 i32 8, label %sw.bb1 | 16 i32 8, label %sw.bb1 |
(...skipping 14 matching lines...) Expand all Loading... |
27 br label %sw.epilog | 31 br label %sw.epilog |
28 | 32 |
29 sw.epilog: ; preds = %sw.bb2, %sw.default
, %entry, %entry, %entry | 33 sw.epilog: ; preds = %sw.bb2, %sw.default
, %entry, %entry, %entry |
30 %result.1 = phi i32 [ %add, %sw.default ], [ %result.0, %sw.bb2 ], [ 17, %entr
y ], [ 17, %entry ], [ 17, %entry ] | 34 %result.1 = phi i32 [ %add, %sw.default ], [ %result.0, %sw.bb2 ], [ 17, %entr
y ], [ 17, %entry ], [ 17, %entry ] |
31 ret i32 %result.1 | 35 ret i32 %result.1 |
32 } | 36 } |
33 | 37 |
34 ; CHECK-NOT: ICE translation error | 38 ; CHECK-NOT: ICE translation error |
35 ; ERRORS-NOT: ICE translation error | 39 ; ERRORS-NOT: ICE translation error |
36 ; DUMP-NOT: SZ | 40 ; DUMP-NOT: SZ |
OLD | NEW |