[PATCH] D97903: [dfsan] Increase coverage of vector and select tests
George Balatsouras via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 4 11:04:13 PST 2021
gbalats added inline comments.
================
Comment at: llvm/test/Instrumentation/DataFlowSanitizer/call.ll:2
; RUN: opt < %s -dfsan -S | FileCheck %s
+; RUN: opt < %s -dfsan -dfsan-fast-16-labels -S | FileCheck %s
; RUN: opt < %s -passes=dfsan -S | FileCheck %s
----------------
stephan.yichao.zhao wrote:
> 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.
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.
================
Comment at: llvm/test/Instrumentation/DataFlowSanitizer/vector.ll:11-12
define <4 x i4> @pass_vector(<4 x i4> %v) {
- ; ARGS_ABI: @"dfs$pass_vector"
- ; ARGS_ABI: ret { <4 x i4>, i16 }
-
- ; FAST16: @"dfs$pass_vector"
- ; FAST16: {{.*}} = load i16, i16* bitcast ([100 x i64]* @__dfsan_arg_tls to i16*), align [[ALIGN:2]]
- ; FAST16: store i16 %1, i16* bitcast ([100 x i64]* @__dfsan_retval_tls to i16*), align [[ALIGN]]
+ ; ARGS_ABI-LABEL: @"dfs$pass_vector"
+ ; ARGS_ABI-SAME: (<4 x i4> %[[VEC:.*]], i[[#SBITS]] %[[LABEL:.*]])
+ ; ARGS_ABI-NEXT: %[[#REG:]] = insertvalue { <4 x i4>, i[[#SBITS]] } undef, <4 x i4> %[[VEC]], 0
----------------
stephan.yichao.zhao wrote:
> Does ARGS_ABI-LABEL @"dfs$pass_vector"(<4 x i4> %[[VEC:.*]], i[[#SBITS]] %[[LABEL:.*]]) also work?
No. The *-LABEL lines cannot include any variables.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97903/new/
https://reviews.llvm.org/D97903
More information about the llvm-commits
mailing list