This is an archive of the discontinued LLVM Phabricator instance.

[LLVM/tools][test] - Remove/fix dead check prefixes.
ClosedPublic

Authored by grimar on Apr 14 2020, 8:08 AM.

Details

Summary

I've experimented with the code for FileCheck that would
enable reporting a error when there are unknown check-prefixes.
E.g. when we have --check-prefixes=KNOWN,UNKNOWN, there is no error
reported about UNKNOWN.

The behavior looks wierd to me, but multiple-missing-prefixes.txt
and others FileCheck tests seems explicitly check this behavior.
Also there are about 1000 tests in LLVM
that have unused prefixes. Most of them lives in:

CodeGen/*
DebugInfo/X86/*
Instrumentation/*
Linker/*
MC/*
Other/*
Transforms/*

(A random example:
https://github.com/llvm/llvm-project/blob/master/llvm/test/CodeGen/PowerPC/srem-vector-lkk.ll has an excessive CHECK)

At the same time it is obvious that we do not want to have
dead prefixes in llvm/test/tools tests. I've fixed all what was able to find.

Note: this fixes patch-debug-dir.test.

Diff Detail

Event Timeline

grimar created this revision.Apr 14 2020, 8:08 AM
mstorsjo added inline comments.Apr 14 2020, 8:20 AM
llvm/test/tools/llvm-objcopy/COFF/patch-debug-dir.test
21

This bit LGTM - oops and thanks.

MaskRay accepted this revision.Apr 14 2020, 10:42 AM

Looks great!

llvm/test/tools/llvm-symbolizer/split-dwarf.test
8

--check-prefixes=SPLIT,DWO

This revision is now accepted and ready to land.Apr 14 2020, 10:42 AM
jhenderson accepted this revision.Apr 15 2020, 12:08 AM

LGTM.

llvm/test/tools/llvm-symbolizer/split-dwarf.test
8

Do this change in all places in this file or none, I'd say, for consistency.

grimar marked an inline comment as done.Apr 15 2020, 3:02 AM
grimar added inline comments.
llvm/test/tools/llvm-symbolizer/split-dwarf.test
8

I'll prepare a separate cleanup change, I guess we might have the same situation in other tests and would be better to fix them at once.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2020, 3:14 AM