| 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 --assemble --disassemble --args -O2 --verbose none \ | 5 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 | FileCheck %s |
| 6 ; RUN: | FileCheck %s | |
| 7 | 6 |
| 8 define i32 @testSwitch(i32 %a) { | 7 define i32 @testSwitch(i32 %a) { |
| 9 entry: | 8 entry: |
| 10 switch i32 %a, label %sw.default [ | 9 switch i32 %a, label %sw.default [ |
| 11 i32 1, label %sw.epilog | 10 i32 1, label %sw.epilog |
| 12 i32 2, label %sw.epilog | 11 i32 2, label %sw.epilog |
| 13 i32 3, label %sw.epilog | 12 i32 3, label %sw.epilog |
| 14 i32 7, label %sw.bb1 | 13 i32 7, label %sw.bb1 |
| 15 i32 8, label %sw.bb1 | 14 i32 8, label %sw.bb1 |
| 16 i32 15, label %sw.bb2 | 15 i32 15, label %sw.bb2 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 ] | 103 ] |
| 105 | 104 |
| 106 sw.default: | 105 sw.default: |
| 107 ret i32 20 | 106 ret i32 20 |
| 108 } | 107 } |
| 109 ; CHECK-LABEL: testSwitchImm64 | 108 ; CHECK-LABEL: testSwitchImm64 |
| 110 ; CHECK: cmp {{.*}},0x1 | 109 ; CHECK: cmp {{.*}},0x1 |
| 111 ; CHECK-NEXT: jne | 110 ; CHECK-NEXT: jne |
| 112 ; CHECK-NEXT: cmp {{.*}},0x0 | 111 ; CHECK-NEXT: cmp {{.*}},0x0 |
| 113 ; CHECK-NEXT: je | 112 ; CHECK-NEXT: je |
| OLD | NEW |