xref: /llvm-project/llvm/test/tools/llvm-reduce/simplify-instructions.ll (revision df60f0bbefec9bd5407a3ad0df8f481a25b2776f)
1; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=simplify-instructions --test FileCheck --test-arg --check-prefix=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
2; RUN: FileCheck --check-prefix=RESULT %s < %t
3
4; CHECK-INTERESTINGNESS: ret
5
6; RESULT: %add4 = add i32 %arg0, %arg1
7; RESULT: ret i32 %add4
8
9define i32 @func(i32 %arg0, i32 %arg1) {
10entry:
11  %add0 = add i32 %arg0, 0
12  %add1 = add i32 %add0, 0
13  %add2 = add i32 %add1, 0
14  %add3 = add i32 %arg1, 0
15  %add4 = add i32 %add2, %add3
16  ret i32 %add4
17}
18