19 lines · plain
1; REQUIRES: asserts2 3; Ensure the test runs in a temp directory. See https://github.com/llvm/llvm-project/pull/167403#event-208487395264; RUN: rm -rf %t.dir && mkdir -p %t.dir && cd %t.dir5 6; RUN: opt -S -passes=instcombine --save-stats=obj -o %t.ll %s && cat %t.stats | FileCheck %s7; RUN: opt -S -passes=instcombine --save-stats=cwd -o %t.ll %s && cat %{t:stem}.tmp.stats | FileCheck %s8; RUN: opt -S -passes=instcombine --save-stats -o %t.ll %s && cat %{t:stem}.tmp.stats | FileCheck %s9; RUN: not opt -S --save-stats=invalid -o %t.ll %s 2>&1 | FileCheck %s --check-prefix=INVALID_ARG10 11; CHECK: {12; CHECK: "instcombine.NumWorklistIterations":13; CHECK: }14 15; INVALID_ARG: {{.*}}opt{{.*}}: for the --save-stats option: Cannot find option named 'invalid'!16define i32 @func() {17 ret i32 018}19