This is an archive of the discontinued LLVM Phabricator instance.

[dfsan] Increase coverage of vector and select tests
ClosedPublic

Authored by gbalats on Mar 3 2021, 6:07 PM.

Details

Summary

Add more expectations in vector.ll and select.ll based on command-line option combinations.
Also, remove hard-coded shadow width references to enable fast8 transition.

Diff Detail

Event Timeline

gbalats created this revision.Mar 3 2021, 6:07 PM
gbalats requested review of this revision.Mar 3 2021, 6:07 PM
llvm/test/Instrumentation/DataFlowSanitizer/call.ll
2

fast16 and legacy modes have the same code path tested by this file: it does not check ld/st much.
It is fine to ignore -dfsan-fast-16-labels.
We may add the new 8bit mode if its codegen introduces different code path.

llvm/test/Instrumentation/DataFlowSanitizer/vector.ll
11–21

Does ARGS_ABI-LABEL @"dfs$pass_vector"(<4 x i4> %[[VEC:.*]], i[[#SBITS]] %[[LABEL:.*]]) also work?

gbalats added inline comments.Mar 4 2021, 11:04 AM
llvm/test/Instrumentation/DataFlowSanitizer/call.ll
2

That's true but the legacy mode will be removed eventually. To enable this transition while retaining the same test coverage we will have to make all tests runnable under fast labels.
Adding a fast16 RUN line can serve as a placeholder for fast8.

I think having both options for a while, even though redundant (as you point out), is safer. When we are ready to deprecate the default legacy mode, removing a few RUN lines will be guaranteed to work no matter how much the code has diverged between the two by then.

llvm/test/Instrumentation/DataFlowSanitizer/vector.ll
11–21

No. The *-LABEL lines cannot include any variables.

stephan.yichao.zhao added inline comments.
llvm/test/Instrumentation/DataFlowSanitizer/vector.ll
11–21

Got it. Thanks.

This revision is now accepted and ready to land.Mar 4 2021, 11:49 AM
This revision was landed with ongoing or failed builds.Mar 4 2021, 12:57 PM
This revision was automatically updated to reflect the committed changes.