| OLD | NEW |
| 1 ; This tests a switch statement, including multiple branches to the | 1 ; This tests a switch statement, including multiple branches to the |
| 2 ; same label which also results in phi instructions with multiple | 2 ; same label which also results in phi instructions with multiple |
| 3 ; entries for the same incoming edge. | 3 ; entries for the same incoming edge. |
| 4 | 4 |
| 5 ; RUN: %p2i -i %s --args -O2 --verbose none \ | 5 ; RUN: %p2i -i %s --args -O2 --verbose none \ |
| 6 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ | 6 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ |
| 7 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s | 7 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s |
| 8 ; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s | |
| 9 ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s | |
| 10 | 8 |
| 11 define i32 @testSwitch(i32 %a) { | 9 define i32 @testSwitch(i32 %a) { |
| 12 entry: | 10 entry: |
| 13 switch i32 %a, label %sw.default [ | 11 switch i32 %a, label %sw.default [ |
| 14 i32 1, label %sw.epilog | 12 i32 1, label %sw.epilog |
| 15 i32 2, label %sw.epilog | 13 i32 2, label %sw.epilog |
| 16 i32 3, label %sw.epilog | 14 i32 3, label %sw.epilog |
| 17 i32 7, label %sw.bb1 | 15 i32 7, label %sw.bb1 |
| 18 i32 8, label %sw.bb1 | 16 i32 8, label %sw.bb1 |
| 19 i32 15, label %sw.bb2 | 17 i32 15, label %sw.bb2 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 ] | 105 ] |
| 108 | 106 |
| 109 sw.default: | 107 sw.default: |
| 110 ret i32 20 | 108 ret i32 20 |
| 111 } | 109 } |
| 112 ; CHECK-LABEL: testSwitchImm64 | 110 ; CHECK-LABEL: testSwitchImm64 |
| 113 ; CHECK: cmp {{.*}}, 1 | 111 ; CHECK: cmp {{.*}}, 1 |
| 114 ; CHECK-NEXT: jne | 112 ; CHECK-NEXT: jne |
| 115 ; CHECK-NEXT: cmp {{.*}}, 0 | 113 ; CHECK-NEXT: cmp {{.*}}, 0 |
| 116 ; CHECK-NEXT: je | 114 ; CHECK-NEXT: je |
| 117 | |
| 118 ; CHECK-NOT: ICE translation error | |
| 119 ; ERRORS-NOT: ICE translation error | |
| 120 ; DUMP-NOT: SZ | |
| OLD | NEW |