diff --git a/mlir/test/mlir-cpu-runner/lit.local.cfg b/mlir/test/mlir-cpu-runner/lit.local.cfg --- a/mlir/test/mlir-cpu-runner/lit.local.cfg +++ b/mlir/test/mlir-cpu-runner/lit.local.cfg @@ -4,6 +4,10 @@ if sys.platform == 'win32': config.unsupported = True +# MSAN does not work with JIT. +if 'msan' in config.available_features: + config.unsupported = True + # Requires the native target to be configured in. if 'llvm_has_native_target' not in config.available_features: config.unsupported = True diff --git a/mlir/unittests/ExecutionEngine/Invoke.cpp b/mlir/unittests/ExecutionEngine/Invoke.cpp --- a/mlir/unittests/ExecutionEngine/Invoke.cpp +++ b/mlir/unittests/ExecutionEngine/Invoke.cpp @@ -232,7 +232,13 @@ elt *= coefficient; } -TEST(NativeMemRefJit, JITCallback) { +// MSAN does not work with JIT. +#if __has_feature(memory_sanitizer) +#define MAYBE_JITCallback DISABLED_JITCallback +#else +#define MAYBE_JITCallback JITCallback +#endif +TEST(NativeMemRefJit, MAYBE_JITCallback) { constexpr int k = 2; constexpr int m = 2; int64_t shape[] = {k, m};