diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/prefix-never-matches.test b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/prefix-never-matches.test --- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/prefix-never-matches.test +++ b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/prefix-never-matches.test @@ -4,5 +4,5 @@ # RUN: %update_llc_test_checks %t.ll 2>&1 | FileCheck %s # RUN: FileCheck --input-file=%t.ll %s --check-prefix=OUTPUT -# CHECK: WARNING: Prefix A had conflicting output -# OUTPUT-NOT: A: \ No newline at end of file +# CHECK: WARNING: prefix A had conflicting output +# OUTPUT-NOT: A: diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/prefix-never-matches.test b/llvm/test/tools/UpdateTestChecks/update_test_checks/prefix-never-matches.test --- a/llvm/test/tools/UpdateTestChecks/update_test_checks/prefix-never-matches.test +++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/prefix-never-matches.test @@ -2,5 +2,5 @@ # RUN: %update_test_checks %t.ll 2>&1 | FileCheck %s # RUN: FileCheck --input-file=%t.ll %s --check-prefix=OUTPUT -# CHECK: WARNING: Prefix A had conflicting output -# OUTPUT-NOT: A: \ No newline at end of file +# CHECK: WARNING: prefix A had conflicting output +# OUTPUT-NOT: A: diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py --- a/llvm/utils/UpdateTestChecks/common.py +++ b/llvm/utils/UpdateTestChecks/common.py @@ -315,8 +315,9 @@ self._global_var_dict.update({prefix:dict()}) def finish_and_get_func_dict(self): - for prefix in self._get_failed_prefixes(): - warn('Prefix %s had conflicting output from different RUN lines for all functions in test %s' % (prefix,self._path,)) + for prefix, funcs in self._get_failed_prefixes_with_functions(): + warn('prefix %s had conflicting output from different RUN lines for functions: %s' % ( + prefix, ', '.join(funcs))) return self._func_dict def func_order(self): @@ -407,17 +408,17 @@ scrubbed_body, scrubbed_extra, args_and_sig, attrs) self._func_order[prefix].append(func) - def _get_failed_prefixes(self): - # This returns the list of those prefixes that failed to match any function, - # because there were conflicting bodies produced by different RUN lines, in - # all instances of the prefix. Effectively, this prefix is unused and should - # be removed. + def _get_failed_prefixes_with_functions(self): + # This returns the list of prefixes that failed to match some functions, + # along with function names, because there were conflicting bodies produced + # by different RUN lines, in all instrances of the prefix. This prefix needs + # to be split or removed. for prefix in self._func_dict: - if (self._func_dict[prefix] and - (not [fct for fct in self._func_dict[prefix] - if self._func_dict[prefix][fct] is not None])): - yield prefix - + if self._func_dict[prefix]: + funcs = [fct for fct in self._func_dict[prefix] + if self._func_dict[prefix][fct] is None] + if funcs: + yield (prefix, funcs) ##### Generator of LLVM IR CHECK lines