llvm-project/llvm/test/Reduce/remove-funcs.ll
Diego Trevino Ferrer ddc64eb948 Added Delta IR Reduction Tool
Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file.

Reviewers: alexshap, chandlerc

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63672

> llvm-svn: 368071

llvm-svn: 368358
2019-08-08 22:16:33 +00:00

35 lines
682 B
LLVM

; Test that llvm-reduce can remove uninteresting functions as well as
; their InstCalls.
;
; RUN: llvm-reduce --test %p/Inputs/remove-funcs.py %s
; RUN: cat reduced.ll | FileCheck %s
; REQUIRES: plugins, shell
; CHECK-NOT: uninteresting1()
define i32 @uninteresting1() {
entry:
ret i32 0
}
; CHECK: interesting()
define i32 @interesting() {
entry:
; CHECK: call i32 @interesting()
%call2 = call i32 @interesting()
; CHECK-NOT: call i32 @uninteresting1()
%call = call i32 @uninteresting1()
ret i32 5
}
; CHECK-NOT: uninteresting2()
define i32 @uninteresting2() {
entry:
ret i32 0
}
; CHECK-NOT: uninteresting3()
define i32 @uninteresting3() {
entry:
ret i32 10
}