| 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: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s | 7 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s |
| 4 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ | 8 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ |
| 5 ; RUN: | FileCheck --check-prefix=DUMP %s | 9 ; RUN: | FileCheck --check-prefix=DUMP %s |
| 6 | 10 |
| 7 define i32 @testSwitch(i32 %a) { | 11 define i32 @testSwitch(i32 %a) { |
| 8 entry: | 12 entry: |
| 9 switch i32 %a, label %sw.default [ | 13 switch i32 %a, label %sw.default [ |
| 10 i32 1, label %sw.epilog | 14 i32 1, label %sw.epilog |
| 11 i32 2, label %sw.epilog | 15 i32 2, label %sw.epilog |
| 12 i32 3, label %sw.epilog | 16 i32 3, label %sw.epilog |
| (...skipping 16 matching lines...) Expand all Loading... |
| 29 br label %sw.epilog | 33 br label %sw.epilog |
| 30 | 34 |
| 31 sw.epilog: ; preds = %sw.bb2, %sw.default
, %entry, %entry, %entry | 35 sw.epilog: ; preds = %sw.bb2, %sw.default
, %entry, %entry, %entry |
| 32 %result.1 = phi i32 [ %add, %sw.default ], [ %result.0, %sw.bb2 ], [ 17, %entr
y ], [ 17, %entry ], [ 17, %entry ] | 36 %result.1 = phi i32 [ %add, %sw.default ], [ %result.0, %sw.bb2 ], [ 17, %entr
y ], [ 17, %entry ], [ 17, %entry ] |
| 33 ret i32 %result.1 | 37 ret i32 %result.1 |
| 34 } | 38 } |
| 35 | 39 |
| 36 ; CHECK-NOT: ICE translation error | 40 ; CHECK-NOT: ICE translation error |
| 37 ; ERRORS-NOT: ICE translation error | 41 ; ERRORS-NOT: ICE translation error |
| 38 ; DUMP-NOT: SZ | 42 ; DUMP-NOT: SZ |
| OLD | NEW |