| 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 ; TODO(kschimpf) Find out why lc2i must be used. | 5 ; TODO(kschimpf) Find out why lc2i must be used. |
| 6 ; RUN: %lc2i -i %s --args -O2 --verbose none --no-phi-edge-split \ | 6 ; RUN: %lc2i -i %s --args -O2 --verbose none --no-phi-edge-split \ |
| 7 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ | 7 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ |
| 8 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s | 8 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ |
| 9 ; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s | 9 ; RUN: | %iflc FileCheck %s |
| 10 ; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s | 10 ; RUN: %lc2i -i %s --args --verbose none \ |
| 11 ; RUN: | %iflc FileCheck --check-prefix=ERRORS %s |
| 12 ; RUN: %lc2i -i %s --insts | %iflc %szdiff %s \ |
| 13 ; RUN: | %iflc FileCheck --check-prefix=DUMP %s |
| 11 | 14 |
| 12 define internal i32 @testPhi1(i32 %arg) { | 15 define internal i32 @testPhi1(i32 %arg) { |
| 13 entry: | 16 entry: |
| 14 %cmp1 = icmp sgt i32 %arg, 0 | 17 %cmp1 = icmp sgt i32 %arg, 0 |
| 15 br i1 %cmp1, label %next, label %target | 18 br i1 %cmp1, label %next, label %target |
| 16 next: | 19 next: |
| 17 br label %target | 20 br label %target |
| 18 target: | 21 target: |
| 19 %merge = phi i1 [ %cmp1, %entry ], [ false, %next ] | 22 %merge = phi i1 [ %cmp1, %entry ], [ false, %next ] |
| 20 %result = zext i1 %merge to i32 | 23 %result = zext i1 %merge to i32 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 97 |
| 95 ; CHECK-LABEL: testPhi3 | 98 ; CHECK-LABEL: testPhi3 |
| 96 ; CHECK: push [[EBX:.*]] | 99 ; CHECK: push [[EBX:.*]] |
| 97 ; CHECK: mov {{.*}}, dword ptr [esp | 100 ; CHECK: mov {{.*}}, dword ptr [esp |
| 98 ; CHECK: mov | 101 ; CHECK: mov |
| 99 ; CHECK: mov {{.*}}[[ADDR:.*1000]] | 102 ; CHECK: mov {{.*}}[[ADDR:.*1000]] |
| 100 ; CHECK: cmp {{.*}}, 0 | 103 ; CHECK: cmp {{.*}}, 0 |
| 101 ; CHECK: jne | 104 ; CHECK: jne |
| 102 ; CHECK: mov {{.*}}[[ADDR]] | 105 ; CHECK: mov {{.*}}[[ADDR]] |
| 103 ; CHECK: pop [[EBX]] | 106 ; CHECK: pop [[EBX]] |
| OLD | NEW |