[WebAssembly] Don't perform the returned-argument optimization on constants.
[oota-llvm.git] / test / CodeGen / Generic / print-machineinstrs.ll
1 ; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs=branch-folder -o /dev/null 2>&1 | FileCheck %s
2 ; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs -o /dev/null 2>&1 | FileCheck %s
3 ; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs= -o /dev/null 2>&1 | FileCheck %s
4
5 define i64 @foo(i64 %a, i64 %b) nounwind {
6 ; CHECK: -branch-folder  -machineinstr-printer
7 ; CHECK: Control Flow Optimizer
8 ; CHECK-NEXT: MachineFunction Printer
9 ; CHECK: Machine code for function foo:
10   %c = add i64 %a, %b
11   %d = trunc i64 %c to i32
12   %e = zext i32 %d to i64
13   ret i64 %e
14 }