blob: b33e0929edc8c9feb929462ed3142ce976a9b79c [file] [log] [blame]
Jonas Paulsson82f15a72017-06-23 14:30:46 +00001; 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 Wilson33e51882012-05-30 00:17:12 +00009
10define i64 @foo(i64 %a, i64 %b) nounwind {
Jonas Paulsson82f15a72017-06-23 14:30:46 +000011; 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 Wilson33e51882012-05-30 00:17:12 +000023 %c = add i64 %a, %b
24 %d = trunc i64 %c to i32
25 %e = zext i32 %d to i64
26 ret i64 %e
27}