| OLD | NEW |
| 1 ; This tests some of the subtleties of Phi lowering. In particular, | 1 ; This tests some of the subtleties of Phi lowering. In particular, |
| 2 ; it tests that it does the right thing when it tries to enable | 2 ; it tests that it does the right thing when it tries to enable |
| 3 ; compare/branch fusing. | 3 ; compare/branch fusing. |
| 4 | 4 |
| 5 ; RUN: %p2i -i %s --assemble --disassemble --args -O2 --verbose none \ | 5 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 --phi-edge-split=0 \ |
| 6 ; RUN: --phi-edge-split=0 \ | |
| 7 ; RUN: | FileCheck %s | 6 ; RUN: | FileCheck %s |
| 8 | 7 |
| 9 define internal i32 @testPhi1(i32 %arg) { | 8 define internal i32 @testPhi1(i32 %arg) { |
| 10 entry: | 9 entry: |
| 11 %cmp1 = icmp sgt i32 %arg, 0 | 10 %cmp1 = icmp sgt i32 %arg, 0 |
| 12 br i1 %cmp1, label %next, label %target | 11 br i1 %cmp1, label %next, label %target |
| 13 next: | 12 next: |
| 14 br label %target | 13 br label %target |
| 15 target: | 14 target: |
| 16 %merge = phi i1 [ %cmp1, %entry ], [ false, %next ] | 15 %merge = phi i1 [ %cmp1, %entry ], [ false, %next ] |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 92 |
| 94 ; CHECK-LABEL: testPhi3 | 93 ; CHECK-LABEL: testPhi3 |
| 95 ; CHECK: push [[EBX:.*]] | 94 ; CHECK: push [[EBX:.*]] |
| 96 ; CHECK: mov {{.*}},DWORD PTR [esp | 95 ; CHECK: mov {{.*}},DWORD PTR [esp |
| 97 ; CHECK: mov | 96 ; CHECK: mov |
| 98 ; CHECK: mov {{.*}},DWORD PTR [[ADDR:.*0x3e8]] | 97 ; CHECK: mov {{.*}},DWORD PTR [[ADDR:.*0x3e8]] |
| 99 ; CHECK: cmp {{.*}},0x0 | 98 ; CHECK: cmp {{.*}},0x0 |
| 100 ; CHECK: jne | 99 ; CHECK: jne |
| 101 ; CHECK: mov DWORD PTR [[ADDR]] | 100 ; CHECK: mov DWORD PTR [[ADDR]] |
| 102 ; CHECK: pop [[EBX]] | 101 ; CHECK: pop [[EBX]] |
| OLD | NEW |