| OLD | NEW |
| 1 ; Tests the branch optimizations under O2 (against a lack of | 1 ; Tests the branch optimizations under O2 (against a lack of |
| 2 ; optimizations under Om1). | 2 ; optimizations under Om1). |
| 3 | 3 |
| 4 ; RUN: %p2i -i %s --args -O2 --verbose none \ | 4 ; RUN: %p2i --assemble --disassemble -i %s --args -O2 --verbose none \ |
| 5 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ | |
| 6 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ | |
| 7 ; RUN: | FileCheck --check-prefix=O2 %s | 5 ; RUN: | FileCheck --check-prefix=O2 %s |
| 8 ; RUN: %p2i -i %s --args -Om1 --verbose none \ | 6 ; RUN: %p2i --assemble --disassemble -i %s --args -Om1 --verbose none \ |
| 9 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ | |
| 10 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ | |
| 11 ; RUN: | FileCheck --check-prefix=OM1 %s | 7 ; RUN: | FileCheck --check-prefix=OM1 %s |
| 12 | 8 |
| 13 declare void @dummy() | 9 declare void @dummy() |
| 14 | 10 |
| 15 ; An unconditional branch to the next block should be removed. | 11 ; An unconditional branch to the next block should be removed. |
| 16 define void @testUncondToNextBlock() { | 12 define void @testUncondToNextBlock() { |
| 17 entry: | 13 entry: |
| 18 call void @dummy() | 14 call void @dummy() |
| 19 br label %next | 15 br label %next |
| 20 next: | 16 next: |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 ; OM1-LABEL: testCondTargetNextBlock | 89 ; OM1-LABEL: testCondTargetNextBlock |
| 94 ; OM1: cmp {{.*}}, 123 | 90 ; OM1: cmp {{.*}}, 123 |
| 95 ; OM1: jge | 91 ; OM1: jge |
| 96 ; OM1: cmp | 92 ; OM1: cmp |
| 97 ; OM1: jne | 93 ; OM1: jne |
| 98 ; OM1: jmp | 94 ; OM1: jmp |
| 99 ; OM1: call | 95 ; OM1: call |
| 100 ; OM1: ret | 96 ; OM1: ret |
| 101 ; OM1: call | 97 ; OM1: call |
| 102 ; OM1: ret | 98 ; OM1: ret |
| OLD | NEW |