Jonas Paulsson | 82f15a7 | 2017-06-23 14:30:46 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs=branch-folder -verify-machineinstrs -o /dev/null 2>&1 \ |
| 2 | ; RUN: | FileCheck %s -check-prefix=PRINT-BRANCH-FOLD |
| 3 | ; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs -verify-machineinstrs -o /dev/null 2>&1 \ |
| 4 | ; RUN: | FileCheck %s -check-prefix=PRINT |
| 5 | ; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs= -verify-machineinstrs -o /dev/null 2>&1 \ |
| 6 | ; RUN: | FileCheck %s -check-prefix=PRINT |
| 7 | |
| 8 | ; Note: -verify-machineinstrs is used in order to make this test compatible with EXPENSIVE_CHECKS. |
Bob Wilson | 33e5188 | 2012-05-30 00:17:12 +0000 | [diff] [blame] | 9 | |
| 10 | define i64 @foo(i64 %a, i64 %b) nounwind { |
Jonas Paulsson | 82f15a7 | 2017-06-23 14:30:46 +0000 | [diff] [blame] | 11 | ; PRINT-BRANCH-FOLD: -branch-folder -machineverifier -machineinstr-printer |
| 12 | ; PRINT-BRANCH-FOLD: Control Flow Optimizer |
| 13 | ; PRINT-BRANCH-FOLD-NEXT: Verify generated machine code |
| 14 | ; PRINT-BRANCH-FOLD-NEXT: MachineFunction Printer |
| 15 | ; PRINT-BRANCH-FOLD: Machine code for function foo: |
| 16 | |
| 17 | ; PRINT: -branch-folder -machineinstr-printer |
| 18 | ; PRINT: Control Flow Optimizer |
| 19 | ; PRINT-NEXT: MachineFunction Printer |
| 20 | ; PRINT-NEXT: Verify generated machine code |
| 21 | ; PRINT: Machine code for function foo: |
| 22 | |
Bob Wilson | 33e5188 | 2012-05-30 00:17:12 +0000 | [diff] [blame] | 23 | %c = add i64 %a, %b |
| 24 | %d = trunc i64 %c to i32 |
| 25 | %e = zext i32 %d to i64 |
| 26 | ret i64 %e |
| 27 | } |