diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index f3291137bca1d..403b3fbc8a753 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -70,6 +70,10 @@ Deprecated Compiler Flags The following options are deprecated and ignored. They will be removed in future versions of Clang. +- -mmpx used to enable the __MPX__ preprocessor define for the Intel MPX + instructions. There were no MPX intrinsics. +- -mno-mpx used to disable -mmpx and is the default behavior. + - ... Modified Compiler Flags diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 7cc00384882ed..6aba6744e0e38 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -211,6 +211,10 @@ def clang_ignored_legacy_options_Group : OptionGroup<"">, def : Flag<["-"], "fslp-vectorize-aggressive">, Group; def : Flag<["-"], "fno-slp-vectorize-aggressive">, Group; +// Retired with clang-10.0. Previously controlled X86 MPX ISA. +def mmpx : Flag<["-"], "mmpx">, Group; +def mno_mpx : Flag<["-"], "mno-mpx">, Group; + // Group that ignores all gcc optimizations that won't be implemented def clang_ignored_gcc_optimization_f_Group : OptionGroup< "">, Group, Flags<[Ignored]>; @@ -3000,8 +3004,6 @@ def mmovdiri : Flag<["-"], "mmovdiri">, Group; def mno_movdiri : Flag<["-"], "mno-movdiri">, Group; def mmovdir64b : Flag<["-"], "mmovdir64b">, Group; def mno_movdir64b : Flag<["-"], "mno-movdir64b">, Group; -def mmpx : Flag<["-"], "mmpx">, Group; -def mno_mpx : Flag<["-"], "mno-mpx">, Group; def mmwaitx : Flag<["-"], "mmwaitx">, Group; def mno_mwaitx : Flag<["-"], "mno-mwaitx">, Group; def mpku : Flag<["-"], "mpku">, Group; diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp index a010b5a36fa1a..311ae6e170287 100644 --- a/clang/lib/Basic/Targets/X86.cpp +++ b/clang/lib/Basic/Targets/X86.cpp @@ -198,7 +198,6 @@ bool X86TargetInfo::initFeatureMap( SkylakeCommon: setFeatureEnabledImpl(Features, "xsavec", true); setFeatureEnabledImpl(Features, "xsaves", true); - setFeatureEnabledImpl(Features, "mpx", true); setFeatureEnabledImpl(Features, "clflushopt", true); setFeatureEnabledImpl(Features, "aes", true); LLVM_FALLTHROUGH; @@ -277,7 +276,6 @@ bool X86TargetInfo::initFeatureMap( setFeatureEnabledImpl(Features, "xsavec", true); setFeatureEnabledImpl(Features, "xsaves", true); setFeatureEnabledImpl(Features, "clflushopt", true); - setFeatureEnabledImpl(Features, "mpx", true); setFeatureEnabledImpl(Features, "fsgsbase", true); setFeatureEnabledImpl(Features, "aes", true); LLVM_FALLTHROUGH; @@ -798,8 +796,6 @@ bool X86TargetInfo::handleTargetFeatures(std::vector &Features, HasAVX512VP2INTERSECT = true; } else if (Feature == "+sha") { HasSHA = true; - } else if (Feature == "+mpx") { - HasMPX = true; } else if (Feature == "+shstk") { HasSHSTK = true; } else if (Feature == "+movbe") { @@ -1220,8 +1216,6 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__CLWB__"); if (HasWBNOINVD) Builder.defineMacro("__WBNOINVD__"); - if (HasMPX) - Builder.defineMacro("__MPX__"); if (HasSHSTK) Builder.defineMacro("__SHSTK__"); if (HasSGX) @@ -1378,7 +1372,6 @@ bool X86TargetInfo::isValidFeatureName(StringRef Name) const { .Case("movbe", true) .Case("movdiri", true) .Case("movdir64b", true) - .Case("mpx", true) .Case("mwaitx", true) .Case("pclmul", true) .Case("pconfig", true) @@ -1462,7 +1455,6 @@ bool X86TargetInfo::hasFeature(StringRef Feature) const { .Case("movbe", HasMOVBE) .Case("movdiri", HasMOVDIRI) .Case("movdir64b", HasMOVDIR64B) - .Case("mpx", HasMPX) .Case("mwaitx", HasMWAITX) .Case("pclmul", HasPCLMUL) .Case("pconfig", HasPCONFIG) diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index dd1e7db6c81e5..6f6cf47d65ae9 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -80,7 +80,6 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo { bool HasAVX512IFMA = false; bool HasAVX512VP2INTERSECT = false; bool HasSHA = false; - bool HasMPX = false; bool HasSHSTK = false; bool HasSGX = false; bool HasCX8 = false; diff --git a/clang/test/Driver/x86-target-features.c b/clang/test/Driver/x86-target-features.c index ed9c0af1f9638..29d8f59ab8724 100644 --- a/clang/test/Driver/x86-target-features.c +++ b/clang/test/Driver/x86-target-features.c @@ -72,8 +72,8 @@ // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mmpx %s -### -o %t.o 2>&1 | FileCheck -check-prefix=MPX %s // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-mpx %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-MPX %s -// MPX: "-target-feature" "+mpx" -// NO-MPX: "-target-feature" "-mpx" +// MPX: the flag '-mmpx' has been deprecated and will be ignored +// NO-MPX: the flag '-mno-mpx' has been deprecated and will be ignored // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mshstk %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CETSS %s // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-shstk %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-CETSS %s diff --git a/clang/test/Preprocessor/predefined-arch-macros.c b/clang/test/Preprocessor/predefined-arch-macros.c index b21d6f5ead88c..5981c80ae3a1a 100644 --- a/clang/test/Preprocessor/predefined-arch-macros.c +++ b/clang/test/Preprocessor/predefined-arch-macros.c @@ -682,7 +682,6 @@ // CHECK_SKL_M32: #define __LZCNT__ 1 // CHECK_SKL_M32: #define __MMX__ 1 // CHECK_SKL_M32: #define __MOVBE__ 1 -// CHECK_SKL_M32: #define __MPX__ 1 // CHECK_SKL_M32: #define __PCLMUL__ 1 // CHECK_SKL_M32: #define __POPCNT__ 1 // CHECK_SKL_M32: #define __PRFCHW__ 1 @@ -717,7 +716,6 @@ // CHECK_SKL_M64: #define __LZCNT__ 1 // CHECK_SKL_M64: #define __MMX__ 1 // CHECK_SKL_M64: #define __MOVBE__ 1 -// CHECK_SKL_M64: #define __MPX__ 1 // CHECK_SKL_M64: #define __PCLMUL__ 1 // CHECK_SKL_M64: #define __POPCNT__ 1 // CHECK_SKL_M64: #define __PRFCHW__ 1 @@ -912,7 +910,6 @@ // CHECK_SKX_M32: #define __LZCNT__ 1 // CHECK_SKX_M32: #define __MMX__ 1 // CHECK_SKX_M32: #define __MOVBE__ 1 -// CHECK_SKX_M32: #define __MPX__ 1 // CHECK_SKX_M32: #define __PCLMUL__ 1 // CHECK_SKX_M32: #define __PKU__ 1 // CHECK_SKX_M32: #define __POPCNT__ 1 @@ -958,7 +955,6 @@ // CHECK_SKX_M64: #define __LZCNT__ 1 // CHECK_SKX_M64: #define __MMX__ 1 // CHECK_SKX_M64: #define __MOVBE__ 1 -// CHECK_SKX_M64: #define __MPX__ 1 // CHECK_SKX_M64: #define __PCLMUL__ 1 // CHECK_SKX_M64: #define __PKU__ 1 // CHECK_SKX_M64: #define __POPCNT__ 1 @@ -1008,7 +1004,6 @@ // CHECK_CLX_M32: #define __LZCNT__ 1 // CHECK_CLX_M32: #define __MMX__ 1 // CHECK_CLX_M32: #define __MOVBE__ 1 -// CHECK_CLX_M32: #define __MPX__ 1 // CHECK_CLX_M32: #define __PCLMUL__ 1 // CHECK_CLX_M32: #define __PKU__ 1 // CHECK_CLX_M32: #define __POPCNT__ 1 @@ -1055,7 +1050,6 @@ // CHECK_CLX_M64: #define __LZCNT__ 1 // CHECK_CLX_M64: #define __MMX__ 1 // CHECK_CLX_M64: #define __MOVBE__ 1 -// CHECK_CLX_M64: #define __MPX__ 1 // CHECK_CLX_M64: #define __PCLMUL__ 1 // CHECK_CLX_M64: #define __PKU__ 1 // CHECK_CLX_M64: #define __POPCNT__ 1 @@ -1106,7 +1100,6 @@ // CHECK_CPX_M32: #define __LZCNT__ 1 // CHECK_CPX_M32: #define __MMX__ 1 // CHECK_CPX_M32: #define __MOVBE__ 1 -// CHECK_CPX_M32: #define __MPX__ 1 // CHECK_CPX_M32: #define __PCLMUL__ 1 // CHECK_CPX_M32: #define __PKU__ 1 // CHECK_CPX_M32: #define __POPCNT__ 1 @@ -1154,7 +1147,6 @@ // CHECK_CPX_M64: #define __LZCNT__ 1 // CHECK_CPX_M64: #define __MMX__ 1 // CHECK_CPX_M64: #define __MOVBE__ 1 -// CHECK_CPX_M64: #define __MPX__ 1 // CHECK_CPX_M64: #define __PCLMUL__ 1 // CHECK_CPX_M64: #define __PKU__ 1 // CHECK_CPX_M64: #define __POPCNT__ 1 @@ -1205,7 +1197,6 @@ // CHECK_CNL_M32: #define __LZCNT__ 1 // CHECK_CNL_M32: #define __MMX__ 1 // CHECK_CNL_M32: #define __MOVBE__ 1 -// CHECK_CNL_M32: #define __MPX__ 1 // CHECK_CNL_M32: #define __PCLMUL__ 1 // CHECK_CNL_M32: #define __PKU__ 1 // CHECK_CNL_M32: #define __POPCNT__ 1 @@ -1254,7 +1245,6 @@ // CHECK_CNL_M64: #define __LZCNT__ 1 // CHECK_CNL_M64: #define __MMX__ 1 // CHECK_CNL_M64: #define __MOVBE__ 1 -// CHECK_CNL_M64: #define __MPX__ 1 // CHECK_CNL_M64: #define __PCLMUL__ 1 // CHECK_CNL_M64: #define __PKU__ 1 // CHECK_CNL_M64: #define __POPCNT__ 1 @@ -1309,7 +1299,6 @@ // CHECK_ICL_M32: #define __LZCNT__ 1 // CHECK_ICL_M32: #define __MMX__ 1 // CHECK_ICL_M32: #define __MOVBE__ 1 -// CHECK_ICL_M32: #define __MPX__ 1 // CHECK_ICL_M32: #define __PCLMUL__ 1 // CHECK_ICL_M32: #define __PKU__ 1 // CHECK_ICL_M32: #define __POPCNT__ 1 @@ -1367,7 +1356,6 @@ // CHECK_ICL_M64: #define __LZCNT__ 1 // CHECK_ICL_M64: #define __MMX__ 1 // CHECK_ICL_M64: #define __MOVBE__ 1 -// CHECK_ICL_M64: #define __MPX__ 1 // CHECK_ICL_M64: #define __PCLMUL__ 1 // CHECK_ICL_M64: #define __PKU__ 1 // CHECK_ICL_M64: #define __POPCNT__ 1 @@ -1426,7 +1414,6 @@ // CHECK_ICX_M32: #define __LZCNT__ 1 // CHECK_ICX_M32: #define __MMX__ 1 // CHECK_ICX_M32: #define __MOVBE__ 1 -// CHECK_ICX_M32: #define __MPX__ 1 // CHECK_ICX_M32: #define __PCLMUL__ 1 // CHECK_ICX_M32: #define __PCONFIG__ 1 // CHECK_ICX_M32: #define __PKU__ 1 @@ -1485,7 +1472,6 @@ // CHECK_ICX_M64: #define __LZCNT__ 1 // CHECK_ICX_M64: #define __MMX__ 1 // CHECK_ICX_M64: #define __MOVBE__ 1 -// CHECK_ICX_M64: #define __MPX__ 1 // CHECK_ICX_M64: #define __PCLMUL__ 1 // CHECK_ICX_M64: #define __PCONFIG__ 1 // CHECK_ICX_M64: #define __PKU__ 1 @@ -1548,7 +1534,6 @@ // CHECK_TGL_M32: #define __MOVBE__ 1 // CHECK_TGL_M32: #define __MOVDIR64B__ 1 // CHECK_TGL_M32: #define __MOVDIRI__ 1 -// CHECK_TGL_M32: #define __MPX__ 1 // CHECK_TGL_M32: #define __PCLMUL__ 1 // CHECK_TGL_M32-NOT: #define __PCONFIG__ 1 // CHECK_TGL_M32: #define __PKU__ 1 @@ -1611,7 +1596,6 @@ // CHECK_TGL_M64: #define __MOVBE__ 1 // CHECK_TGL_M64: #define __MOVDIR64B__ 1 // CHECK_TGL_M64: #define __MOVDIRI__ 1 -// CHECK_TGL_M64: #define __MPX__ 1 // CHECK_TGL_M64: #define __PCLMUL__ 1 // CHECK_TGL_M64-NOT: #define __PCONFIG__ 1 // CHECK_TGL_M64: #define __PKU__ 1 @@ -1688,7 +1672,6 @@ // CHECK_GLM_M32: #define __FXSR__ 1 // CHECK_GLM_M32: #define __MMX__ 1 // CHECK_GLM_M32: #define __MOVBE__ 1 -// CHECK_GLM_M32: #define __MPX__ 1 // CHECK_GLM_M32: #define __PCLMUL__ 1 // CHECK_GLM_M32: #define __POPCNT__ 1 // CHECK_GLM_M32: #define __PRFCHW__ 1 @@ -1722,7 +1705,6 @@ // CHECK_GLM_M64: #define __FXSR__ 1 // CHECK_GLM_M64: #define __MMX__ 1 // CHECK_GLM_M64: #define __MOVBE__ 1 -// CHECK_GLM_M64: #define __MPX__ 1 // CHECK_GLM_M64: #define __PCLMUL__ 1 // CHECK_GLM_M64: #define __POPCNT__ 1 // CHECK_GLM_M64: #define __PRFCHW__ 1 @@ -1754,7 +1736,6 @@ // CHECK_GLMP_M32: #define __FXSR__ 1 // CHECK_GLMP_M32: #define __MMX__ 1 // CHECK_GLMP_M32: #define __MOVBE__ 1 -// CHECK_GLMP_M32: #define __MPX__ 1 // CHECK_GLMP_M32: #define __PCLMUL__ 1 // CHECK_GLMP_M32: #define __POPCNT__ 1 // CHECK_GLMP_M32: #define __PRFCHW__ 1 @@ -1791,7 +1772,6 @@ // CHECK_GLMP_M64: #define __FXSR__ 1 // CHECK_GLMP_M64: #define __MMX__ 1 // CHECK_GLMP_M64: #define __MOVBE__ 1 -// CHECK_GLMP_M64: #define __MPX__ 1 // CHECK_GLMP_M64: #define __PCLMUL__ 1 // CHECK_GLMP_M64: #define __POPCNT__ 1 // CHECK_GLMP_M64: #define __PRFCHW__ 1 @@ -1830,7 +1810,6 @@ // CHECK_TRM_M32: #define __MOVBE__ 1 // CHECK_TRM_M32: #define __MOVDIR64B__ 1 // CHECK_TRM_M32: #define __MOVDIRI__ 1 -// CHECK_TRM_M32: #define __MPX__ 1 // CHECK_TRM_M32: #define __PCLMUL__ 1 // CHECK_TRM_M32: #define __POPCNT__ 1 // CHECK_TRM_M32: #define __PRFCHW__ 1 @@ -1872,7 +1851,6 @@ // CHECK_TRM_M64: #define __MOVBE__ 1 // CHECK_TRM_M64: #define __MOVDIR64B__ 1 // CHECK_TRM_M64: #define __MOVDIRI__ 1 -// CHECK_TRM_M64: #define __MPX__ 1 // CHECK_TRM_M64: #define __PCLMUL__ 1 // CHECK_TRM_M64: #define __POPCNT__ 1 // CHECK_TRM_M64: #define __PRFCHW__ 1 diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake index 7c21212515734..d2da0496b97fc 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -245,6 +245,8 @@ endif() if(OS_NAME MATCHES "Linux") set(ALL_FUZZER_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64}) +elseif (OS_NAME MATCHES "Windows") + set(ALL_FUZZER_SUPPORTED_ARCH ${X86} ${X86_64}) elseif(OS_NAME MATCHES "Android") set(ALL_FUZZER_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}) else() diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt index 3585c7839bd24..0e54188720689 100644 --- a/lldb/CMakeLists.txt +++ b/lldb/CMakeLists.txt @@ -71,6 +71,7 @@ add_subdirectory(docs) option(LLDB_INCLUDE_TESTS "Generate build targets for the LLDB unit tests." ${LLVM_INCLUDE_TESTS}) if(LLDB_INCLUDE_TESTS) + set(LLDB_TEST_BUILD_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lldb-test-build.noindex" CACHE PATH "The build root for building tests.") # Set the path to the default lldb test executable. set(LLDB_DEFAULT_TEST_EXECUTABLE "${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb${CMAKE_EXECUTABLE_SUFFIX}") diff --git a/lldb/lit/CMakeLists.txt b/lldb/lit/CMakeLists.txt index 133525caddab2..608b211bc0c57 100644 --- a/lldb/lit/CMakeLists.txt +++ b/lldb/lit/CMakeLists.txt @@ -15,6 +15,9 @@ endif() get_property(LLDB_DOTEST_ARGS GLOBAL PROPERTY LLDB_DOTEST_ARGS_PROPERTY) set(dotest_args_replacement ${LLVM_BUILD_MODE}) +set(LLDB_TEST_MODULE_CACHE_LLDB "${LLDB_TEST_BUILD_DIRECTORY}/module-cache-lldb" CACHE PATH "The Clang module cache used by the Clang embedded in LLDB while running tests.") +set(LLDB_TEST_MODULE_CACHE_CLANG "${LLDB_TEST_BUILD_DIRECTORY}/module-cache-clang" CACHE PATH "The Clang module cache used by the Clang while building tests.") + if(LLDB_BUILT_STANDALONE) # In paths to our build-tree, replace CMAKE_CFG_INTDIR with our configuration name placeholder. string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} config_runtime_output_dir ${LLVM_RUNTIME_OUTPUT_INTDIR}) diff --git a/lldb/lit/Settings/TestModuleCacheSanity.test b/lldb/lit/Settings/TestModuleCacheSanity.test new file mode 100644 index 0000000000000..f16f40d47a6bf --- /dev/null +++ b/lldb/lit/Settings/TestModuleCacheSanity.test @@ -0,0 +1,4 @@ +# This is a sanity check that verifies that the module cache path is set +# correctly and points inside the default test build directory. +RUN: %lldb -o 'settings show symbols.clang-modules-cache-path' | FileCheck %s +CHECK: lldb-test-build.noindex{{.*}}module-cache-lldb diff --git a/lldb/lit/Suite/lit.cfg b/lldb/lit/Suite/lit.cfg index 490aaefab76dc..80f5ef0a3cd2b 100644 --- a/lldb/lit/Suite/lit.cfg +++ b/lldb/lit/Suite/lit.cfg @@ -69,6 +69,12 @@ if config.dotest_lit_args_str: if config.llvm_libs_dir: dotest_cmd += ['--env', 'LLVM_LIBS_DIR=' + config.llvm_libs_dir] +if config.lldb_build_directory: + dotest_cmd += ['--build-dir', config.lldb_build_directory] + +if config.lldb_module_cache: + dotest_cmd += ['--module-cache-dir', config.lldb_module_cache] + # Load LLDB test format. sys.path.append(os.path.join(config.lldb_src_root, "lit", "Suite")) import lldbtest diff --git a/lldb/lit/Suite/lit.site.cfg.in b/lldb/lit/Suite/lit.site.cfg.in index 8fd3d25d93193..9b950cf32a016 100644 --- a/lldb/lit/Suite/lit.site.cfg.in +++ b/lldb/lit/Suite/lit.site.cfg.in @@ -15,6 +15,9 @@ config.host_os = "@HOST_OS@" config.host_triple = "@LLVM_HOST_TRIPLE@" config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@" config.target_triple = "@TARGET_TRIPLE@" +config.lldb_build_directory = "@LLDB_TEST_BUILD_DIRECTORY@" +config.lldb_module_cache = "@LLDB_TEST_MODULE_CACHE_LLDB@" +config.clang_module_cache = "@LLDB_TEST_MODULE_CACHE_CLANG@" config.python_executable = "@PYTHON_EXECUTABLE@" config.dotest_path = "@LLDB_SOURCE_DIR@/test/dotest.py" config.dotest_args_str = "@LLDB_DOTEST_ARGS@" diff --git a/lldb/lit/helper/toolchain.py b/lldb/lit/helper/toolchain.py index 84bd2dc2b651d..0290e12c8f550 100644 --- a/lldb/lit/helper/toolchain.py +++ b/lldb/lit/helper/toolchain.py @@ -104,6 +104,9 @@ def use_support_substitutions(config): flags += ['-L' + config.llvm_libs_dir, '-Wl,-rpath,' + config.llvm_libs_dir] + # The clang module cache is used for building inferiors. + flags += ['-fmodules-cache-path={}'.format(config.clang_module_cache)] + additional_tool_dirs=[] if config.lldb_lit_tools_dir: additional_tool_dirs.append(config.lldb_lit_tools_dir) diff --git a/lldb/lit/lit-lldb-init.in b/lldb/lit/lit-lldb-init.in index 9e3bfebe9117b..2c1925c971a47 100644 --- a/lldb/lit/lit-lldb-init.in +++ b/lldb/lit/lit-lldb-init.in @@ -2,3 +2,4 @@ settings set symbols.enable-external-lookup false settings set plugin.process.gdb-remote.packet-timeout 60 settings set interpreter.echo-comment-commands false +settings set symbols.clang-modules-cache-path "@LLDB_TEST_MODULE_CACHE_LLDB@" diff --git a/lldb/lit/lit.cfg.py b/lldb/lit/lit.cfg.py index b56e41e720b54..4cf0855df3642 100644 --- a/lldb/lit/lit.cfg.py +++ b/lldb/lit/lit.cfg.py @@ -64,13 +64,10 @@ def calculate_arch_features(arch_string): ('--targets-built', calculate_arch_features) ]) -# Clean the module caches in the test build directory. This is -# necessary in an incremental build whenever clang changes underneath, -# so doing it once per lit.py invocation is close enough. - -for i in ['module-cache-clang', 'module-cache-lldb']: - cachedir = os.path.join(config.lldb_libs_dir, '..', - 'lldb-test-build.noindex', i) +# Clean the module caches in the test build directory. This is necessary in an +# incremental build whenever clang changes underneath, so doing it once per +# lit.py invocation is close enough. +for cachedir in [config.clang_module_cache, config.lldb_module_cache]: if os.path.isdir(cachedir): print("Deleting module cache at %s."%cachedir) shutil.rmtree(cachedir) diff --git a/lldb/lit/lit.site.cfg.py.in b/lldb/lit/lit.site.cfg.py.in index 738b25d09310e..2ff07f7dab9d8 100644 --- a/lldb/lit/lit.site.cfg.py.in +++ b/lldb/lit/lit.site.cfg.py.in @@ -18,6 +18,9 @@ config.have_zlib = @LLVM_ENABLE_ZLIB@ config.host_triple = "@LLVM_HOST_TRIPLE@" config.lldb_bitness = 64 if @LLDB_IS_64_BITS@ else 32 config.lldb_disable_python = @LLDB_DISABLE_PYTHON@ +config.lldb_build_directory = "@LLDB_TEST_BUILD_DIRECTORY@" +config.lldb_module_cache = "@LLDB_TEST_MODULE_CACHE_LLDB@" +config.clang_module_cache = "@LLDB_TEST_MODULE_CACHE_CLANG@" # Support substitution of the tools and libs dirs with user parameters. This is # used when we can't determine the tool dir at configuration time. diff --git a/lldb/packages/Python/lldbsuite/test/configuration.py b/lldb/packages/Python/lldbsuite/test/configuration.py index 72f046e86d7a5..8bd17feacb130 100644 --- a/lldb/packages/Python/lldbsuite/test/configuration.py +++ b/lldb/packages/Python/lldbsuite/test/configuration.py @@ -106,6 +106,9 @@ # The base directory in which the tests are being built. test_build_dir = None +# The clang module cache directory used by lldb. +module_cache_dir = None + # The only directory to scan for tests. If multiple test directories are # specified, and an exclusive test subdirectory is specified, the latter option # takes precedence. diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index d41bafb0fecbd..e8974a453c144 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -55,7 +55,7 @@ def get_dotest_invocation(): def is_exe(fpath): """Returns true if fpath is an executable.""" if fpath == None: - return False + return False return os.path.isfile(fpath) and os.access(fpath, os.X_OK) @@ -274,10 +274,10 @@ def parseOptionsAndInitTestdirs(): break if args.dsymutil: - os.environ['DSYMUTIL'] = args.dsymutil + os.environ['DSYMUTIL'] = args.dsymutil elif platform_system == 'Darwin': - os.environ['DSYMUTIL'] = seven.get_command_output( - 'xcrun -find -toolchain default dsymutil') + os.environ['DSYMUTIL'] = seven.get_command_output( + 'xcrun -find -toolchain default dsymutil') if args.filecheck: # The lldb-dotest script produced by the CMake build passes in a path @@ -426,6 +426,11 @@ def parseOptionsAndInitTestdirs(): configuration.lldb_platform_working_dir = args.lldb_platform_working_dir if args.test_build_dir: configuration.test_build_dir = args.test_build_dir + if args.module_cache_dir: + configuration.module_cache_dir = args.module_cache_dir + else: + configuration.module_cache_dir = os.path.join(configuration.test_build_dir, + 'module-cache-lldb') # Gather all the dirs passed on the command line. if len(args.args) > 0: @@ -869,16 +874,16 @@ def canRunWatchpointTests(): platform = lldbplatformutil.getPlatform() if platform == "netbsd": - if os.geteuid() == 0: - return True, "root can always write dbregs" - try: - output = subprocess.check_output(["/sbin/sysctl", "-n", - "security.models.extensions.user_set_dbregs"]).decode().strip() - if output == "1": - return True, "security.models.extensions.user_set_dbregs enabled" - except subprocess.CalledProcessError: - pass - return False, "security.models.extensions.user_set_dbregs disabled" + if os.geteuid() == 0: + return True, "root can always write dbregs" + try: + output = subprocess.check_output(["/sbin/sysctl", "-n", + "security.models.extensions.user_set_dbregs"]).decode().strip() + if output == "1": + return True, "security.models.extensions.user_set_dbregs enabled" + except subprocess.CalledProcessError: + pass + return False, "security.models.extensions.user_set_dbregs disabled" return True, "watchpoint support available" def checkWatchpointSupport(): diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py b/lldb/packages/Python/lldbsuite/test/dotest_args.py index fa36cbcef4569..8de4d8dbb2f79 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest_args.py +++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py @@ -147,6 +147,11 @@ def create_parser(): metavar='Test build directory', default='lldb-test-build.noindex', help='The root build directory for the tests. It will be removed before running.') + group.add_argument( + '--module-cache-dir', + dest='module_cache_dir', + metavar='The clang module cache directory used by LLDB', + help='The clang module cache directory used by LLDB. This is not the one used by the makefiles. Defaults to /module-cache-lldb.') # Configuration options group = parser.add_argument_group('Remote platform options') diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 6c00350167d0e..48dc81780e9b4 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -1852,9 +1852,9 @@ def setUp(self): Base.setUp(self) # Set the clang modules cache path used by LLDB. - mod_cache = os.path.join(os.environ["LLDB_BUILD"], "module-cache-lldb") - self.runCmd('settings set symbols.clang-modules-cache-path "%s"' - % mod_cache) + self.runCmd( + 'settings set symbols.clang-modules-cache-path "{}"'.format( + configuration.module_cache_dir)) for s in self.setUpCommands(): self.runCmd(s) @@ -2058,13 +2058,13 @@ def runCmd(self, cmd, msg=None, check=True, trace=False, inHistory=False): if check: output = "" if self.res.GetOutput(): - output += "\nCommand output:\n" + self.res.GetOutput() + output += "\nCommand output:\n" + self.res.GetOutput() if self.res.GetError(): - output += "\nError output:\n" + self.res.GetError() + output += "\nError output:\n" + self.res.GetError() if msg: - msg += output + msg += output if cmd: - cmd += output + cmd += output self.assertTrue(self.res.Succeeded(), msg if (msg) else CMD_MSG(cmd)) diff --git a/lldb/packages/Python/lldbsuite/test/sanity/TestModuleCacheSanity.py b/lldb/packages/Python/lldbsuite/test/sanity/TestModuleCacheSanity.py new file mode 100644 index 0000000000000..2ce00d4e7ca13 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/sanity/TestModuleCacheSanity.py @@ -0,0 +1,22 @@ +""" +This is a sanity check that verifies that the module cache path is set +correctly and points inside the default test build directory. +""" + +from __future__ import print_function + +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * + + +class ModuleCacheSanityTestCase(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + NO_DEBUG_INFO_TESTCASE = True + + def test(self): + self.expect( + 'settings show symbols.clang-modules-cache-path', + substrs=['lldb-test-build.noindex', 'module-cache-lldb']) diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt index 6f33c8e204ba7..3bfb2332862c1 100644 --- a/lldb/test/CMakeLists.txt +++ b/lldb/test/CMakeLists.txt @@ -39,8 +39,6 @@ set(LLDB_TEST_COMMON_ARGS --arch=${LLDB_TEST_ARCH} -s ${CMAKE_BINARY_DIR}/lldb-test-traces - --build-dir - ${CMAKE_BINARY_DIR}/lldb-test-build.noindex -S nm -u CXXFLAGS -u CFLAGS diff --git a/lldb/utils/lldb-dotest/lldb-dotest.in b/lldb/utils/lldb-dotest/lldb-dotest.in index 5cef370d74f06..68d3127340334 100755 --- a/lldb/utils/lldb-dotest/lldb-dotest.in +++ b/lldb/utils/lldb-dotest/lldb-dotest.in @@ -3,6 +3,7 @@ import subprocess import sys dotest_path = '@LLDB_SOURCE_DIR@/test/dotest.py' +build_dir = '@LLDB_TEST_BUILD_DIRECTORY@' dotest_args_str = '@LLDB_DOTEST_ARGS@' if __name__ == '__main__': @@ -11,6 +12,7 @@ if __name__ == '__main__': # Build dotest.py command. cmd = [sys.executable, dotest_path] cmd.extend(dotest_args) + cmd.extend(['--build-dir', build_dir]) cmd.extend(wrapper_args) # Invoke dotest.py and return exit code. print(' '.join(cmd)) diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst index c05804f2573fe..9e5273dea48de 100644 --- a/llvm/docs/ReleaseNotes.rst +++ b/llvm/docs/ReleaseNotes.rst @@ -98,6 +98,10 @@ Changes to the AVR Target During this release ... +* Deprecated the mpx feature flag for the Intel MPX instructions. There were no + intrinsics for this feature. This change only this effects the results + returned by getHostCPUFeatures on CPUs that implement the MPX instructions. + Changes to the WebAssembly Target --------------------------------- diff --git a/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp b/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp index 0870aa3812fe9..057a32fd1d5aa 100644 --- a/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp +++ b/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp @@ -150,8 +150,13 @@ void GISelKnownBits::computeKnownBitsImpl(Register R, KnownBits &Known, Known.Zero = KnownZeroOut; break; } - // G_GEP is like G_ADD. FIXME: Is this true for all targets? - case TargetOpcode::G_GEP: + case TargetOpcode::G_GEP: { + // G_GEP is like G_ADD. FIXME: Is this true for all targets? + LLT Ty = MRI.getType(MI.getOperand(1).getReg()); + if (DL.isNonIntegralAddressSpace(Ty.getAddressSpace())) + break; + LLVM_FALLTHROUGH; + } case TargetOpcode::G_ADD: { // Output known-0 bits are known if clear or set in both the low clear bits // common to both LHS & RHS. For example, 8+(X<<3) is known to have the diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index 836b363efd9ab..ef10b9689e829 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -1378,7 +1378,6 @@ bool sys::getHostCPUFeatures(StringMap &Features) { Features["bmi2"] = HasLeaf7 && ((EBX >> 8) & 1); Features["invpcid"] = HasLeaf7 && ((EBX >> 10) & 1); Features["rtm"] = HasLeaf7 && ((EBX >> 11) & 1); - Features["mpx"] = HasLeaf7 && ((EBX >> 14) & 1); // AVX512 is only supported if the OS supports the context save for it. Features["avx512f"] = HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save; Features["avx512dq"] = HasLeaf7 && ((EBX >> 17) & 1) && HasAVX512Save; diff --git a/llvm/lib/Target/X86/X86.td b/llvm/lib/Target/X86/X86.td index b720dac307a4a..da7ec0ab74ded 100644 --- a/llvm/lib/Target/X86/X86.td +++ b/llvm/lib/Target/X86/X86.td @@ -241,8 +241,11 @@ def FeatureCLDEMOTE : SubtargetFeature<"cldemote", "HasCLDEMOTE", "true", "Enable Cache Demote">; def FeaturePTWRITE : SubtargetFeature<"ptwrite", "HasPTWRITE", "true", "Support ptwrite instruction">; -def FeatureMPX : SubtargetFeature<"mpx", "HasMPX", "true", - "Support MPX instructions">; +// FIXME: This feature is deprecated in 10.0 and should not be used for +// anything, but removing it would break IR files that may contain it in a +// target-feature attribute. +def FeatureDeprecatedMPX : SubtargetFeature<"mpx", "DeprecatedHasMPX", "false", + "Deprecated. Support MPX instructions">; def FeatureLEAForSP : SubtargetFeature<"lea-sp", "UseLeaForSP", "true", "Use LEA for adjusting the stack pointer">; def FeatureSlowDivide32 : SubtargetFeature<"idivl-to-divb", @@ -580,7 +583,6 @@ def ProcessorFeatures { // Skylake list SKLAdditionalFeatures = [FeatureAES, - FeatureMPX, FeatureXSAVEC, FeatureXSAVES, FeatureCLFLUSHOPT, @@ -719,7 +721,6 @@ def ProcessorFeatures { // Goldmont list GLMAdditionalFeatures = [FeatureAES, - FeatureMPX, FeatureSHA, FeatureRDSEED, FeatureXSAVE, diff --git a/llvm/lib/Target/X86/X86InstrInfo.td b/llvm/lib/Target/X86/X86InstrInfo.td index 5a5df5edd6d9e..75958dd6c9e10 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.td +++ b/llvm/lib/Target/X86/X86InstrInfo.td @@ -940,7 +940,6 @@ def HasMOVDIR64B : Predicate<"Subtarget->hasMOVDIR64B()">; def HasPTWRITE : Predicate<"Subtarget->hasPTWRITE()">; def FPStackf32 : Predicate<"!Subtarget->hasSSE1()">; def FPStackf64 : Predicate<"!Subtarget->hasSSE2()">; -def HasMPX : Predicate<"Subtarget->hasMPX()">; def HasSHSTK : Predicate<"Subtarget->hasSHSTK()">; def HasCLFLUSHOPT : Predicate<"Subtarget->hasCLFLUSHOPT()">; def HasCLWB : Predicate<"Subtarget->hasCLWB()">; diff --git a/llvm/lib/Target/X86/X86InstrMPX.td b/llvm/lib/Target/X86/X86InstrMPX.td index f7d931510fe20..44ba071947c23 100644 --- a/llvm/lib/Target/X86/X86InstrMPX.td +++ b/llvm/lib/Target/X86/X86InstrMPX.td @@ -12,16 +12,16 @@ // //===----------------------------------------------------------------------===// -// FIXME: Investigate a better scheduler class once MPX is used inside LLVM. +// FIXME: Investigate a better scheduler class if MPX is ever used inside LLVM. let SchedRW = [WriteSystem] in { multiclass mpx_bound_make opc, string OpcodeStr> { def 32rm: I, - Requires<[HasMPX, Not64BitMode]>; + Requires<[Not64BitMode]>; def 64rm: I, - Requires<[HasMPX, In64BitMode]>; + Requires<[In64BitMode]>; } defm BNDMK : mpx_bound_make<0x1B, "bndmk">, XS; @@ -29,17 +29,17 @@ defm BNDMK : mpx_bound_make<0x1B, "bndmk">, XS; multiclass mpx_bound_check opc, string OpcodeStr> { def 32rm: I, - Requires<[HasMPX, Not64BitMode]>; + Requires<[Not64BitMode]>; def 64rm: I, - Requires<[HasMPX, In64BitMode]>; + Requires<[In64BitMode]>; def 32rr: I, - Requires<[HasMPX, Not64BitMode]>; + Requires<[Not64BitMode]>; def 64rr: I, - Requires<[HasMPX, In64BitMode]>; + Requires<[In64BitMode]>; } defm BNDCL : mpx_bound_check<0x1A, "bndcl">, XS, NotMemoryFoldable; defm BNDCU : mpx_bound_check<0x1A, "bndcu">, XD, NotMemoryFoldable; @@ -47,33 +47,31 @@ defm BNDCN : mpx_bound_check<0x1B, "bndcn">, XD, NotMemoryFoldable; def BNDMOVrr : I<0x1A, MRMSrcReg, (outs BNDR:$dst), (ins BNDR:$src), "bndmov\t{$src, $dst|$dst, $src}", []>, PD, - Requires<[HasMPX]>, NotMemoryFoldable; + NotMemoryFoldable; let mayLoad = 1 in { def BNDMOV32rm : I<0x1A, MRMSrcMem, (outs BNDR:$dst), (ins i64mem:$src), "bndmov\t{$src, $dst|$dst, $src}", []>, PD, - Requires<[HasMPX, Not64BitMode]>, NotMemoryFoldable; + Requires<[Not64BitMode]>, NotMemoryFoldable; def BNDMOV64rm : I<0x1A, MRMSrcMem, (outs BNDR:$dst), (ins i128mem:$src), "bndmov\t{$src, $dst|$dst, $src}", []>, PD, - Requires<[HasMPX, In64BitMode]>, NotMemoryFoldable; + Requires<[In64BitMode]>, NotMemoryFoldable; } let isCodeGenOnly = 1, ForceDisassemble = 1 in def BNDMOVrr_REV : I<0x1B, MRMDestReg, (outs BNDR:$dst), (ins BNDR:$src), "bndmov\t{$src, $dst|$dst, $src}", []>, PD, - Requires<[HasMPX]>, NotMemoryFoldable; + NotMemoryFoldable; let mayStore = 1 in { def BNDMOV32mr : I<0x1B, MRMDestMem, (outs), (ins i64mem:$dst, BNDR:$src), "bndmov\t{$src, $dst|$dst, $src}", []>, PD, - Requires<[HasMPX, Not64BitMode]>, NotMemoryFoldable; + Requires<[Not64BitMode]>, NotMemoryFoldable; def BNDMOV64mr : I<0x1B, MRMDestMem, (outs), (ins i128mem:$dst, BNDR:$src), "bndmov\t{$src, $dst|$dst, $src}", []>, PD, - Requires<[HasMPX, In64BitMode]>, NotMemoryFoldable; + Requires<[In64BitMode]>, NotMemoryFoldable; def BNDSTXmr: I<0x1B, MRMDestMem, (outs), (ins anymem:$dst, BNDR:$src), - "bndstx\t{$src, $dst|$dst, $src}", []>, PS, - Requires<[HasMPX]>; + "bndstx\t{$src, $dst|$dst, $src}", []>, PS; } let mayLoad = 1 in def BNDLDXrm: I<0x1A, MRMSrcMem, (outs BNDR:$dst), (ins anymem:$src), - "bndldx\t{$src, $dst|$dst, $src}", []>, PS, - Requires<[HasMPX]>; + "bndldx\t{$src, $dst|$dst, $src}", []>, PS; } // SchedRW diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h index 9f73a821da294..46e777da15ff1 100644 --- a/llvm/lib/Target/X86/X86Subtarget.h +++ b/llvm/lib/Target/X86/X86Subtarget.h @@ -365,8 +365,8 @@ class X86Subtarget final : public X86GenSubtargetInfo { /// Processor has AVX-512 vp2intersect instructions bool HasVP2INTERSECT = false; - /// Processor supports MPX - Memory Protection Extensions - bool HasMPX = false; + /// Deprecated flag for MPX instructions. + bool DeprecatedHasMPX = false; /// Processor supports CET SHSTK - Control-Flow Enforcement Technology /// using Shadow Stack @@ -684,7 +684,6 @@ class X86Subtarget final : public X86GenSubtargetInfo { bool hasBF16() const { return HasBF16; } bool hasVP2INTERSECT() const { return HasVP2INTERSECT; } bool hasBITALG() const { return HasBITALG; } - bool hasMPX() const { return HasMPX; } bool hasSHSTK() const { return HasSHSTK; } bool hasCLFLUSHOPT() const { return HasCLFLUSHOPT; } bool hasCLWB() const { return HasCLWB; } diff --git a/llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp b/llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp index ff49d83f25c54..bf2e87b0d49f6 100644 --- a/llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp @@ -517,6 +517,7 @@ LoopUnrollResult llvm::UnrollAndJamLoop( movePHIs(AftBlocksFirst[It], AftBlocksFirst[0]); } + DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Lazy); // Dominator Tree. Remove the old links between Fore, Sub and Aft, adding the // new ones required. if (Count != 1) { @@ -530,7 +531,7 @@ LoopUnrollResult llvm::UnrollAndJamLoop( ForeBlocksLast.back(), SubLoopBlocksFirst[0]); DTUpdates.emplace_back(DominatorTree::UpdateKind::Insert, SubLoopBlocksLast.back(), AftBlocksFirst[0]); - DT->applyUpdates(DTUpdates); + DTU.applyUpdatesPermissive(DTUpdates); } // Merge adjacent basic blocks, if possible. @@ -538,7 +539,6 @@ LoopUnrollResult llvm::UnrollAndJamLoop( MergeBlocks.insert(ForeBlocksLast.begin(), ForeBlocksLast.end()); MergeBlocks.insert(SubLoopBlocksLast.begin(), SubLoopBlocksLast.end()); MergeBlocks.insert(AftBlocksLast.begin(), AftBlocksLast.end()); - DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Eager); while (!MergeBlocks.empty()) { BasicBlock *BB = *MergeBlocks.begin(); BranchInst *Term = dyn_cast(BB->getTerminator()); @@ -555,6 +555,8 @@ LoopUnrollResult llvm::UnrollAndJamLoop( } else MergeBlocks.erase(BB); } + // Apply updates to the DomTree. + DT = &DTU.getDomTree(); // At this point, the code is well formed. We now do a quick sweep over the // inserted code, doing constant propagation and dead code elimination as we diff --git a/llvm/test/CodeGen/X86/ms-inline-asm-avx512.ll b/llvm/test/CodeGen/X86/ms-inline-asm-avx512.ll index be60f5bca1619..26b08287c05f6 100644 --- a/llvm/test/CodeGen/X86/ms-inline-asm-avx512.ll +++ b/llvm/test/CodeGen/X86/ms-inline-asm-avx512.ll @@ -20,5 +20,5 @@ entry: ; CHECK: movq %rax, 7(%rsp) ; CHECK: retq -attributes #0 = { noinline nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="skylake-avx512" "target-features"="+adx,+aes,+avx,+avx2,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl,+bmi,+bmi2,+clflushopt,+clwb,+cx16,+f16c,+fma,+fsgsbase,+fxsr,+lzcnt,+mmx,+movbe,+mpx,+pclmul,+pku,+popcnt,+rdrnd,+rdseed,+rtm,+sgx,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsavec,+xsaveopt,+xsaves" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #0 = { noinline nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="skylake-avx512" "target-features"="+adx,+aes,+avx,+avx2,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl,+bmi,+bmi2,+clflushopt,+clwb,+cx16,+f16c,+fma,+fsgsbase,+fxsr,+lzcnt,+mmx,+movbe,+pclmul,+pku,+popcnt,+rdrnd,+rdseed,+rtm,+sgx,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsavec,+xsaveopt,+xsaves" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #1 = { nounwind } diff --git a/llvm/test/CodeGen/X86/vector-width-store-merge.ll b/llvm/test/CodeGen/X86/vector-width-store-merge.ll index e316e08ebe1fd..9db3dbfb670a4 100644 --- a/llvm/test/CodeGen/X86/vector-width-store-merge.ll +++ b/llvm/test/CodeGen/X86/vector-width-store-merge.ll @@ -46,8 +46,8 @@ entry: ; Function Attrs: argmemonly nounwind declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #1 -attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "prefer-vector-width"="128" "stack-protector-buffer-size"="8" "target-cpu"="skylake-avx512" "target-features"="+adx,+aes,+avx,+avx2,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl,+bmi,+bmi2,+clflushopt,+clwb,+cx16,+cx8,+f16c,+fma,+fsgsbase,+fxsr,+invpcid,+lzcnt,+mmx,+movbe,+mpx,+pclmul,+pku,+popcnt,+prfchw,+rdrnd,+rdseed,+sahf,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsavec,+xsaveopt,+xsaves" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "prefer-vector-width"="128" "stack-protector-buffer-size"="8" "target-cpu"="skylake-avx512" "target-features"="+adx,+aes,+avx,+avx2,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl,+bmi,+bmi2,+clflushopt,+clwb,+cx16,+cx8,+f16c,+fma,+fsgsbase,+fxsr,+invpcid,+lzcnt,+mmx,+movbe,+pclmul,+pku,+popcnt,+prfchw,+rdrnd,+rdseed,+sahf,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsavec,+xsaveopt,+xsaves" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #1 = { argmemonly nounwind } -attributes #2 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "prefer-vector-width"="256" "stack-protector-buffer-size"="8" "target-cpu"="skylake-avx512" "target-features"="+adx,+aes,+avx,+avx2,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl,+bmi,+bmi2,+clflushopt,+clwb,+cx16,+cx8,+f16c,+fma,+fsgsbase,+fxsr,+invpcid,+lzcnt,+mmx,+movbe,+mpx,+pclmul,+pku,+popcnt,+prfchw,+rdrnd,+rdseed,+sahf,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsavec,+xsaveopt,+xsaves" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #2 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "prefer-vector-width"="256" "stack-protector-buffer-size"="8" "target-cpu"="skylake-avx512" "target-features"="+adx,+aes,+avx,+avx2,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl,+bmi,+bmi2,+clflushopt,+clwb,+cx16,+cx8,+f16c,+fma,+fsgsbase,+fxsr,+invpcid,+lzcnt,+mmx,+movbe,+pclmul,+pku,+popcnt,+prfchw,+rdrnd,+rdseed,+sahf,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsavec,+xsaveopt,+xsaves" "unsafe-fp-math"="false" "use-soft-float"="false" } !0 = !{i32 1, !"wchar_size", i32 4}