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 --filetype=obj --disassemble --args -O2 | FileCheck %s | 5 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 | FileCheck %s |
6 | 6 |
7 ; TODO(jvoung): Update to -02 once the phi assignments is done for ARM | 7 ; TODO(jvoung): Update to -02 once the phi assignments is done for ARM |
8 ; RUN: %if --need=target_ARM32 --need=allow_dump \ | 8 ; RUN: %if --need=target_ARM32 --need=allow_dump \ |
9 ; RUN: --command %p2i --filetype=asm --assemble --disassemble \ | 9 ; RUN: --command %p2i --filetype=asm --assemble --disassemble \ |
10 ; RUN: --target arm32 -i %s --args -Om1 --skip-unimplemented \ | 10 ; RUN: --target arm32 -i %s --args -Om1 --skip-unimplemented \ |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 ; CHECK-NEXT: jne | 140 ; CHECK-NEXT: jne |
141 ; CHECK-NEXT: cmp {{.*}},0x0 | 141 ; CHECK-NEXT: cmp {{.*}},0x0 |
142 ; CHECK-NEXT: je | 142 ; CHECK-NEXT: je |
143 | 143 |
144 ; ARM32-LABEL: testSwitchImm64 | 144 ; ARM32-LABEL: testSwitchImm64 |
145 ; ARM32: cmp {{r[0-9]+}}, #1 | 145 ; ARM32: cmp {{r[0-9]+}}, #1 |
146 ; ARM32-NEXT: cmpeq {{r[0-9]+}}, #0 | 146 ; ARM32-NEXT: cmpeq {{r[0-9]+}}, #0 |
147 ; ARM32-NEXT: beq [[ADDR:[0-9a-f]+]] | 147 ; ARM32-NEXT: beq [[ADDR:[0-9a-f]+]] |
148 ; ARM32-NEXT: b [[ADDR]] | 148 ; ARM32-NEXT: b [[ADDR]] |
149 | 149 |
| 150 define i32 @testSwitchUndef64() { |
| 151 entry: |
| 152 switch i64 undef, label %sw.default [ |
| 153 i64 1, label %sw.default |
| 154 ] |
| 155 |
| 156 sw.default: |
| 157 ret i32 20 |
| 158 } |
| 159 ; CHECK-LABEL: testSwitchUndef64 |
| 160 ; CHECK: mov {{.*}},0x0 |
| 161 ; CHECK: mov {{.*}},0x0 |
| 162 ; ARM32-LABEL: testSwitchUndef64 |
| 163 ; ARM32: movw {{.*}}, #0 |
| 164 ; ARM32: movw {{.*}}, #0 |
OLD | NEW |