diff --git a/llvm/docs/CommandGuide/llvm-reduce.rst b/llvm/docs/CommandGuide/llvm-reduce.rst index 2670668af6cca..85111e6e29443 100644 --- a/llvm/docs/CommandGuide/llvm-reduce.rst +++ b/llvm/docs/CommandGuide/llvm-reduce.rst @@ -108,8 +108,9 @@ GENERIC OPTIONS EXIT STATUS ------------ -:program:`llvm-reduce` returns 0 under normal operation. It returns a non-zero -exit code if there were any errors. +:program:`llvm-reduce` returns 0 under normal operation. It returns a +non-zero exit code if there were any errors. Returns 2 if the +interestingness test reported the initial input was not interesting. EXAMPLE ------- diff --git a/llvm/tools/llvm-reduce/llvm-reduce.cpp b/llvm/tools/llvm-reduce/llvm-reduce.cpp index 288a384c2ed49..f7492988084ce 100644 --- a/llvm/tools/llvm-reduce/llvm-reduce.cpp +++ b/llvm/tools/llvm-reduce/llvm-reduce.cpp @@ -203,7 +203,7 @@ int main(int Argc, char **Argv) { // interestingness checks. if (!Tester.getProgram().isReduced(Tester)) { errs() << "\nInput isn't interesting! Verify interesting-ness test\n"; - return 1; + return 2; } // Try to reduce code