| OLD | NEW |
| 1 ; This tests the advanced lowering of switch statements. The advanced lowering | 1 ; This tests the advanced lowering of switch statements. The advanced lowering |
| 2 ; uses jump tables, range tests and binary search. | 2 ; uses jump tables, range tests and binary search. |
| 3 | 3 |
| 4 ; RUN: %p2i -i %s --filetype=asm --assemble --disassemble --args --adv-switch \ | 4 ; RUN: %if --need=allow_dump --command %p2i -i %s --filetype=asm --assemble \ |
| 5 ; RUN: -O2 | FileCheck %s | 5 ; RUN: --disassemble --args --adv-switch -O2 | FileCheck %s |
| 6 | 6 |
| 7 ; Dense but non-continuous ranges should be converted into a jump table. | 7 ; Dense but non-continuous ranges should be converted into a jump table. |
| 8 define internal i32 @testJumpTable(i32 %a) { | 8 define internal i32 @testJumpTable(i32 %a) { |
| 9 entry: | 9 entry: |
| 10 switch i32 %a, label %sw.default [ | 10 switch i32 %a, label %sw.default [ |
| 11 i32 91, label %sw.default | 11 i32 91, label %sw.default |
| 12 i32 92, label %sw.bb1 | 12 i32 92, label %sw.bb1 |
| 13 i32 93, label %sw.default | 13 i32 93, label %sw.default |
| 14 i32 99, label %sw.bb1 | 14 i32 99, label %sw.bb1 |
| 15 i32 98, label %sw.default | 15 i32 98, label %sw.default |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 ; CHECK-NEXT: cmp {{.*}},0x0 | 182 ; CHECK-NEXT: cmp {{.*}},0x0 |
| 183 ; CHECK-NEXT: je | 183 ; CHECK-NEXT: je |
| 184 ; CHECK: cmp {{.*}},0x159 | 184 ; CHECK: cmp {{.*}},0x159 |
| 185 ; CHECK-NEXT: jne | 185 ; CHECK-NEXT: jne |
| 186 ; CHECK-NEXT: cmp {{.*}},0x0 | 186 ; CHECK-NEXT: cmp {{.*}},0x0 |
| 187 ; CHECK-NEXT: je | 187 ; CHECK-NEXT: je |
| 188 ; CHECK: cmp {{.*}},0x34567890 | 188 ; CHECK: cmp {{.*}},0x34567890 |
| 189 ; CHECK-NEXT: jne | 189 ; CHECK-NEXT: jne |
| 190 ; CHECK-NEXT: cmp {{.*}},0x12 | 190 ; CHECK-NEXT: cmp {{.*}},0x12 |
| 191 ; CHECK-NEXT: je | 191 ; CHECK-NEXT: je |
| OLD | NEW |