SuccessChanges

Summary

  1. [libc++] Remove redundant request for enabling warnings (details)
Commit 8d129c03cb8cb7cf04c76b4cb9aaa4855fed5b01 by Louis Dionne
[libc++] Remove redundant request for enabling warnings

The libc++ test suite enables warnings with Clang and AppleClang by
default, so there's no need to request it explicitly when running Lit
in the build bots that are using Clang or AppleClang. Doing so only
creates confusion as to whether warnings are enabled by default.
The file was modifiedbuildbot/osuosl/master/config/builders.py (diff)

Summary

  1. [gn build] (manually) port a6fcf5ca033 (details)
  2. [PhaseOrdering] add tests for reductions; NFC (PR43953) (details)
  3. [x86] form reduction intrinsics from vectorizers instead of raw IR (details)
  4. TypeMetadataUtils.h - reduce Instructions.h include to forward declaration. NFC. (details)
  5. ScalarEvolutionNormalization.h - reduce ScalarEvolutionExpressions.h include to forward declaration. NFC. (details)
  6. [HIP] Add default header and include path (details)
  7. [CMake] Do not append -lm to CMAKE_REQUIRED_LIBRARIES on Apple (details)
  8. [mlir] Add verify method to adaptor (details)
  9. [mlir][Linalg] NFC - Cleanup debug, address post-commit review. (details)
  10. [libc++abi] Properly fix XFAILs for exception alignment (details)
  11. Reland D80640: [CodeGen][SVE] Calculate correct type legalization for scalable vectors. (details)
  12. Fix lit tests hip-include-path.hip and hip-host-cpu-macros.cu (details)
  13. [gn build] Port 11d06b9511b (details)
  14. [mlir][Vector] Add folding of memref_cast into vector_transfer ops (details)
  15. [llvm-ar] Add more tests for errors in opening archives (details)
  16. [llvm-ar] Update error messages and tests as per latest preferred style (details)
  17. [ARM] VQMOVN demand bits analysis (details)
  18. [libc++] Avoid passing -xc++ in Lit feature detection (details)
  19. [llvm-objcopy] Reorder --dump-section before --remove-section for ELF (details)
  20. [mlir][test][CPU] Reduce the size of mlir-cpu-runner-tests (details)
  21. [llvm-objcopy] Reorder --dump-section for MachO (details)
  22. [apple clang] disable in-process CC1 to preserve crashlog compatibility (details)
  23. GlobalISel: Infer nofpexcept flag during selection for non-strict ops (details)
  24. AMDGPU/GlobalISel: Fix some broken YAML in MIR test (details)
  25. [LiveDebugValues] Remove PendingInLocs (NFC) (details)
  26. [LiveDebugValues] Fix output stream (NFC) (details)
  27. [KernelAddressSanitizer] Make globals constructors compatible with kernel (details)
  28. [hwasan] Disable malloc-fill by default. (details)
  29. [WebAssembly] Improve clang diagnostics for wasm attributes (details)
  30. [X86] Teach combineVectorShiftImm to constant fold undef elements to 0 not undef. (details)
  31. AMDGPU: Fix missing immarg on buffer.atomic.fadd intrinsic (details)
  32. AMDGPU: Fix incorrect selection of buffer atomic fadd (details)
  33. Attempt to fix hip-include-path.hip (details)
  34. [gn build] (manually) merge 5eedf07ab999d (details)
  35. Fix -Wunused-variable after D80515 (details)
  36. Correctly report modified status for AMDGPUUnifyDivergentExitNodes (details)
  37. Revert "[WebAssembly] Improve clang diagnostics for wasm attributes" (details)
  38. GlobalISel: Add G_EXTRACT/G_INSERT offset to legalize info (details)
Commit 7928f2c1778795f5e112503e22207a93734bc680 by thakis
[gn build] (manually) port a6fcf5ca033
The file was modifiedllvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
Commit 22c4c6dd382cad8e87dc2fc8494307b0b0914e80 by spatel
[PhaseOrdering] add tests for reductions; NFC (PR43953)
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/vector-reductions.ll
Commit e50059f6b6b32c134e0f4f81281a774cb460524e by spatel
[x86] form reduction intrinsics from vectorizers instead of raw IR

Motivating examples are seen in the PhaseOrdering tests based on:
https://bugs.llvm.org/show_bug.cgi?id=43953#c2 - if we have
intrinsics there, some pass can fold them.

The intrinsics are still named "experimental" at this point, but
if there is no fallout from this patch, that will be a good
indicator that it is safe to finalize them.

Differential Revision: https://reviews.llvm.org/D80867
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/vector-reductions.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/reduction-fastmath.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/reorder_repeated_ops.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/strided_load_cost.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/PR35628_2.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/PR39774.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/PR40310.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/horizontal-minmax.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/invariant-store-vectorization.ll
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.h
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/reassociated-loads.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/PR35628_1.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/pr35432.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/scheduling.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/reduction.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/pr42674.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/tail_loop_folding.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/horizontal.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/remark_horcost.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/reduction_loads.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/used-reduced-op.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/horizontal-list.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/vectorize-reorder-reuse.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/reverse_extract_elements.ll
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/vector-reductions-expanded.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/undef_vect.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/imprecise-through-phis.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/reduction_unrolled.ll
Commit ea0880ddefbcd634e462d87ff09b7bc720562659 by llvm-dev
TypeMetadataUtils.h - reduce Instructions.h include to forward declaration. NFC.

Move implicit include dependencies down to source file.
The file was modifiedllvm/lib/Analysis/TypeMetadataUtils.cpp
The file was modifiedllvm/include/llvm/Analysis/TypeMetadataUtils.h
Commit a3597ecae95938351339b2011baedb3f23ea72de by llvm-dev
ScalarEvolutionNormalization.h - reduce ScalarEvolutionExpressions.h include to forward declaration. NFC.
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolutionNormalization.h
Commit 11d06b9511bd25aabbfad10dff548b0ce29135a5 by Yaxun.Liu
[HIP] Add default header and include path

To support std::complex and some other standard C/C++ functions in HIP device code,
they need to be forced to be __host__ __device__ functions by pragmas. This is done
by some clang standard C++ wrapper headers which are shared between cuda-clang and hip-Clang.

For these standard C++ wapper headers to work properly, specific include path order
has to be enforced:

  clang C++ wrapper include path
  standard C++ include path
  clang include path

Also, these C++ wrapper headers require device version of some standard C/C++ functions
must be declared before including them. This needs to be done by including a default
header which declares or defines these device functions. The default header is always
included before any other headers are included by users.

This patch adds the the default header and include path for HIP.

Differential Revision: https://reviews.llvm.org/D81176
The file was modifiedclang/lib/Driver/ToolChains/HIP.h
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_wavefrontsize64_on.bc
The file was modifiedclang/test/Driver/rocm-device-libs.cl
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_finite_only_off.bc
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
The file was modifiedclang/lib/Headers/CMakeLists.txt
The file was modifiedclang/include/clang/Driver/ToolChain.h
The file was modifiedclang/lib/Driver/ToolChains/Gnu.h
The file was modifiedclang/test/Driver/rocm-detect.cl
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc
The file was addedclang/lib/Headers/__clang_hip_libdevice_declares.h
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_unsafe_math_on.bc
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_isa_version_803.bc
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_daz_opt_off.bc
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_finite_only_off.bc
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_isa_version_900.bc
The file was modifiedclang/include/clang/Basic/DiagnosticDriverKinds.td
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_unsafe_math_off.bc
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/opencl.bc
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_isa_version_1012.bc
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_wavefrontsize64_on.bc
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_daz_opt_on.bc
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_unsafe_math_off.bc
The file was addedclang/lib/Headers/__clang_hip_runtime_wrapper.h
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was addedclang/lib/Headers/__clang_hip_math.h
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_isa_version_803.bc
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_isa_version_1012.bc
The file was modifiedclang/lib/Driver/ToolChains/Linux.h
The file was modifiedclang/lib/Headers/__clang_cuda_math_forward_declares.h
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_isa_version_1011.bc
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_finite_only_on.bc
The file was addedclang/test/Driver/hip-include-path.hip
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_finite_only_on.bc
The file was modifiedclang/lib/Driver/ToolChains/AMDGPU.cpp
The file was modifiedclang/lib/Driver/ToolChains/AMDGPU.h
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/ocml.bc
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc
The file was addedclang/lib/Driver/ToolChains/ROCm.h
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_unsafe_math_on.bc
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_isa_version_900.bc
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/ocml.bc
The file was modifiedclang/lib/Driver/ToolChains/MSVC.h
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/hip.bc
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_wavefrontsize64_off.bc
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_wavefrontsize64_off.bc
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_isa_version_1010.bc
The file was modifiedclang/lib/Driver/ToolChains/MSVC.cpp
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_isa_version_1010.bc
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/ockl.bc
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_isa_version_1011.bc
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/oclc_daz_opt_off.bc
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/oclc_daz_opt_on.bc
The file was modifiedclang/include/clang/Driver/Options.td
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/hip.bc
The file was addedclang/test/Driver/Inputs/rocm/amdgcn/bitcode/opencl.bc
The file was modifiedclang/lib/Driver/ToolChains/Cuda.cpp
The file was modifiedclang/lib/Driver/ToolChains/Linux.cpp
The file was removedclang/test/Driver/Inputs/rocm-device-libs/amdgcn/bitcode/ockl.bc
The file was modifiedclang/test/Driver/rocm-not-found.cl
The file was modifiedclang/test/Driver/hip-device-libs.hip
The file was modifiedclang/lib/Driver/ToolChain.cpp
The file was modifiedclang/test/Driver/rocm-detect.hip
The file was addedclang/test/Driver/Inputs/rocm/include/hip/hip_runtime.h
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp
Commit f57dd41562340b0d5d9931b3f1becca761a54d26 by Louis Dionne
[CMake] Do not append -lm to CMAKE_REQUIRED_LIBRARIES on Apple

On Apple platforms, linking against libSystem.dylib is sufficient, and
some Apple platforms don't provide libm.dylib. On those platforms, adding
-lm to CMAKE_REQUIRED_LIBRARIES causes all subsequent compile-flag checks
to fail due to the missing library.

Differential Revision: https://reviews.llvm.org/D81265
The file was modifiedllvm/cmake/config-ix.cmake
Commit b0921f68e1eeb3ac0cf4e178014237e14c20be03 by jpienaar
[mlir] Add verify method to adaptor

This allows verifying op-indepent attributes (e.g., attributes that do not require the op to have been created) before constructing an operation. These include checking whether required attributes are defined or constraints on attributes (such as I32 attribute). This is not perfect (e.g., if one had a disjunctive constraint where one part relied on the op and the other doesn't, then this would not try and extract the op independent from the op dependent).

The next step is to move these out to a trait that could be verified earlier than in the generated method. The first use case is for inferring the return type while constructing the op. At that point you don't have an Operation yet and that ends up in one having to duplicate the same checks, e.g., verify that attribute A is defined before querying A in shape function which requires that duplication. Instead this allows one to invoke a method to verify all the traits and, if this is checked first during verification, then all other traits could use attributes knowing they have been verified.

It is a little bit funny to have these on the adaptor, but I see the adaptor as a place to collect information about the op before the op is constructed (e.g., avoiding stringly typed accessors, verifying what is possible to verify before the op is constructed) while being cheap to use even with constructed op (so layer of indirection between the op constructed/being constructed). And from that point of view it made sense to me.

Differential Revision: https://reviews.llvm.org/D80842
The file was modifiedmlir/test/IR/invalid-ops.mlir
The file was modifiedmlir/test/Dialect/LLVMIR/global.mlir
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
The file was modifiedmlir/test/Dialect/GPU/invalid.mlir
The file was modifiedmlir/docs/OpDefinitions.md
The file was modifiedmlir/test/Dialect/SPIRV/composite-ops.mlir
The file was modifiedmlir/test/Dialect/Vector/invalid.mlir
The file was modifiedmlir/test/mlir-tblgen/predicate.td
The file was modifiedmlir/test/mlir-tblgen/op-attribute.td
Commit 56ce65e2b649c665c5257131c691bf959959b912 by ntv
[mlir][Linalg] NFC - Cleanup debug, address post-commit review.
The file was modifiedmlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
Commit d520dfec3bc4c5cfadaecbe5c2576d4fcfd5bfff by Louis Dionne
[libc++abi] Properly fix XFAILs for exception alignment

Since <unwind.h> is in the SDK, not in /usr/include, the XFAILs must
be predicated on the compiler version (ideally even on the SDK version)
instead of the target system version.
The file was modifiedlibcxxabi/test/test_exception_address_alignment.pass.cpp
Commit 937cb7a8c728e20c9c288bf328311e9b69187fcf by sander.desmalen
Reland D80640: [CodeGen][SVE] Calculate correct type legalization for scalable vectors.

This reverts commit 9bcef270d7a319c6c0fdffc6c80984a8f0a30ecb.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/lib/CodeGen/TargetLoweringBase.cpp
The file was modifiedllvm/include/llvm/Support/TypeSize.h
The file was modifiedllvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp
Commit e987c372185d805e3a30097366af2c6f94bc0b29 by Yaxun.Liu
Fix lit tests hip-include-path.hip and hip-host-cpu-macros.cu
The file was modifiedclang/test/Driver/hip-include-path.hip
The file was modifiedclang/test/Preprocessor/hip-host-cpu-macros.cu
Commit e7cc6896f6344660fbf368a53107f17113416607 by llvmgnsyncbot
[gn build] Port 11d06b9511b
The file was modifiedllvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
Commit b56bf30d3cc15896956061fdbeb6d078b63ec91f by ntv
[mlir][Vector] Add folding of memref_cast into vector_transfer ops

Summary:
This revision adds a common folding pattern that starts appearing on
vector_transfer ops.

Differential Revision: https://reviews.llvm.org/D81281
The file was modifiedmlir/test/Dialect/Vector/canonicalize.mlir
The file was modifiedmlir/include/mlir/Dialect/Vector/VectorOps.td
The file was modifiedmlir/lib/Dialect/Vector/VectorOps.cpp
Commit 399b12700b41cd58484c23639e61cace819229f6 by smeenai
[llvm-ar] Add more tests for errors in opening archives

Add 2 more tests for the function performOperation under llvm-ar.cpp. It
tests the scenario when the archive could not be opened for reasons
other than `no_such_file_or_directory` In particular, it tests for the
cases `permission_denied` and `is_a_directory` for the target archive.

Reviewed By: alexshap, jhenderson, smeenai, MaskRay

Differential Revision: https://reviews.llvm.org/D80838
The file was addedllvm/test/tools/llvm-ar/error-opening-permission.test
The file was addedllvm/test/tools/llvm-ar/error-opening-directory.test
Commit 99e1b0dc8fbdd35426ac39a98c05718cd482f48a by smeenai
[llvm-ar] Update error messages and tests as per latest preferred style

It updates two error messages under `performOperation` in the file
llvm-ar.cpp. Furthermore, it also updates tests that print out these
error messages: `llvm/test/Object/ar-create.test` and
`llvm/test/tools/llvm-ar/print.test`.

Reviewed By: jhenderson, MaskRay

Differential Revision: https://reviews.llvm.org/D80846
The file was modifiedllvm/test/tools/llvm-ar/print.test
The file was modifiedllvm/test/Object/ar-create.test
The file was modifiedllvm/test/tools/llvm-ar/error-opening-permission.test
The file was modifiedllvm/tools/llvm-ar/llvm-ar.cpp
The file was modifiedllvm/test/tools/llvm-ar/error-opening-directory.test
Commit e73bb45c2b7bb20eaac230d1708d07c55da47ee2 by david.green
[ARM] VQMOVN demand bits analysis

Similar to VMOVN, a VQMOVN will only demand the top/bottom lanes of it's
first input. However unlike VMOVN it will need access to the entire
second argument, as that value is saturated not just moved in place.

Differential Revision: https://reviews.llvm.org/D80515
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/mve-satmul-loops.ll
Commit 339156ad63c4c876432a3109b4d4a67a9602836b by Louis Dionne
[libc++] Avoid passing -xc++ in Lit feature detection

Otherwise, if %{flags} contain other files like static libraries, those
files are treated as C++ source files instead of object files, and the
compiler gets all confused.
The file was modifiedlibcxx/utils/libcxx/test/dsl.py
Commit a018b538a6177b7fb50bad067ca4e828a85dbf76 by smeenai
[llvm-objcopy] Reorder --dump-section before --remove-section for ELF

Reorder `DumpSection` under `handleArgs` in file `ELFObjcopy.cpp`.
`DumpSection` is placed before `replaceAndRemoveSections` and is
therefore now the first operation under `handleArgs`. Thus, it is now
performed before both `add` and `remove` section operations.

Change for the MachO format at D81123. Together fixes https://bugs.llvm.org/show_bug.cgi?id=44283.

Reviewed By: alexshap, jhenderson, MaskRay

Differential Revision: https://reviews.llvm.org/D81097
The file was modifiedllvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
The file was addedllvm/test/tools/llvm-objcopy/ELF/dump-section-before-add-remove.test
Commit eb7db879af4f550da820e092e7b791243a3166f8 by ntv
[mlir][test][CPU] Reduce the size of mlir-cpu-runner-tests

Two tests regularly show up on the long tail when testing MLIR.
This revision reduces their size.
The file was modifiedmlir/test/mlir-cpu-runner/linalg_integration_test.mlir
The file was modifiedmlir/test/mlir-cpu-runner/sgemm_naive_codegen.mlir
Commit 12e5b02687af0ddc21abfdd17afbc2176fdaa3f9 by smeenai
[llvm-objcopy] Reorder --dump-section for MachO

Reorder `DumpSection` under `handleArgs` in file `MachOObjcopy.cpp`. The
operation to dump a section is now performed before both add and remove
section operations for MachO file format.

Change for the ELF format at D81097. Together fixes
https://bugs.llvm.org/show_bug.cgi?id=44283

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D81123
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp
The file was addedllvm/test/tools/llvm-objcopy/MachO/dump-section-before-add-remove.test
Commit 5eedf07ab999d0a8ba43f41e0c1012d8f6e62c11 by Alex Lorenz
[apple clang] disable in-process CC1 to preserve crashlog compatibility

The in-process CC1 currently doesn't interoperate with the macOS crash analytics,
which we would like to keep enabled for Apple clang. This commit restores the
out-of-process CC1 to the Apple clang CMake configuration for now.

Differential Revision: https://reviews.llvm.org/D80849
The file was modifiedclang/cmake/caches/Apple-stage1.cmake
The file was modifiedclang/test/lit.cfg.py
The file was addedclang/test/Driver/apple-clang-defaults.c
The file was modifiedclang/test/lit.site.cfg.py.in
The file was modifiedclang/cmake/caches/Apple-stage2.cmake
Commit 3b5d4aa258a0f7ccbd5c3ade4286dca8f5d2d984 by arsenm2
GlobalISel: Infer nofpexcept flag during selection for non-strict ops

Match SelectionDAG's behavior of adding nofpexcept to out instructions
that may raise fp exceptions that are selected from instructions that
do not.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rcp.legacy.mir
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.cvt.pkrtz.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fcanonicalize.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.fmed3.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-intrinsic-trunc.mir
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/select-fpext-scalar.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fcmp.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmul.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-frint.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.cos.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fptoui.mir
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/select-fadd-scalar.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fadd.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rsq.clamp.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rsq.mir
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/x86_64-select-fptosi.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmaxnum-ieee.v2s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fadd.s32.mir
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/select-fmul-scalar.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-frint.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmaxnum.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fminnum.v2s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.fract.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-sitofp.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rsq.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-intrinsic-trunc.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fminnum-ieee.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fptosi.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmaxnum-ieee.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-uitofp.mir
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/select-sub.mir
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/select-add.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-ffloor.s32.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.cos.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-ffloor.s64.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rcp.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fminnum-ieee.v2s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fcmp.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmul.v2s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rsq.legacy.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fadd.s64.mir
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/select-fdiv-scalar.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmaxnum-ieee.s16.mir
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/select-fsub-scalar.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fma.s32.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fexp2.mir
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/x86_64-select-sitofp.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.ldexp.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fceil.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-ffloor.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.ldexp.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fminnum.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rcp.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.fract.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fminnum-ieee.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmaxnum.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmaxnum.v2s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fminnum.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.sin.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.sin.mir
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/select-fptrunc-scalar.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fceil.mir
Commit 5ee2a1e476ca3eafaa184ec311168df91310e714 by arsenm2
AMDGPU/GlobalISel: Fix some broken YAML in MIR test

Different tools seem to be more or less strict with the markers
between different functions.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.exp.mir
Commit 6a5326492606d767a7eb94ef418799a95e02ed07 by nikita.ppv
[LiveDebugValues] Remove PendingInLocs (NFC)

PendingInLocs ends up having the same value as InLocs, just computed
a bit more indirectly. It is a leftover of a previous implementation
approach.

This patch drops PendingInLocs, as well as the Diff and Removed
calulations, which are no longer needed.

Differential Revision: https://reviews.llvm.org/D80868
The file was modifiedllvm/lib/CodeGen/LiveDebugValues.cpp
Commit d370088611873565d778add5a0a983fdb29d6872 by nikita.ppv
[LiveDebugValues] Fix output stream (NFC)

This should dump to the provided Out, rather than dbgs(), though
they coincide in current usage.
The file was modifiedllvm/lib/CodeGen/LiveDebugValues.cpp
Commit 866ee2353f7d0224644799d0d1faed53c7f3a06d by elver
[KernelAddressSanitizer] Make globals constructors compatible with kernel

Summary:
This makes -fsanitize=kernel-address emit the correct globals
constructors for the kernel. We had to do the following:

- Disable generation of constructors that rely on linker features such
  as dead-global elimination.

- Only emit constructors for globals *not* in explicit sections. The
  kernel uses sections for special globals, which we should not touch.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203493

Tested:
1. With 'clang/test/CodeGen/asan-globals.cpp'.
2. With test_kasan.ko, we can see:

  BUG: KASAN: global-out-of-bounds in kasan_global_oob+0xb3/0xba [test_kasan]

Reviewers: glider, andreyknvl

Reviewed By: glider

Subscribers: cfe-commits, nickdesaulniers, hiraditya, llvm-commits

Tags: #llvm, #clang

Differential Revision: https://reviews.llvm.org/D80805
The file was modifiedclang/test/CodeGen/asan-globals.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/ModuleUtils.h
The file was modifiedllvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
The file was modifiedllvm/lib/Transforms/Utils/ModuleUtils.cpp
Commit d1a6e4d2db493c0ce27ccba7f287acfeac1776a6 by eugenis
[hwasan] Disable malloc-fill by default.

Summary: Non-zero malloc fill is causing way too many hard to debug issues.

Reviewers: kcc, pcc, hctim

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D81284
The file was modifiedcompiler-rt/lib/hwasan/hwasan_flags.inc
The file was modifiedcompiler-rt/test/hwasan/TestCases/malloc_fill.cpp
Commit 931fcd3ba011c27626a95e5e35b657763284882a by sunfish
[WebAssembly] Improve clang diagnostics for wasm attributes

This patch addresses the review comments on r352930:

- Removes redundant diagnostic checking code
- Removes errnoneous use of diag::err_alias_is_definition, which
   turned out to be ineffective anyway since functions can be defined later
   in the translation unit and avoid detection.
- Adds a test for various invalid cases for import_name and import_module.

Differential Revision: https://reviews.llvm.org/D59520
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was addedclang/test/AST/ast-dump-wasm-attr-export.c
The file was modifiedclang/include/clang/Sema/Sema.h
The file was addedclang/test/AST/ast-dump-wasm-attr-import.c
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was addedclang/test/Sema/attr-wasm.c
Commit 7c9a89fed8f5d53d61fe3a61a2581a7c28b1b6d2 by craig.topper
[X86] Teach combineVectorShiftImm to constant fold undef elements to 0 not undef.

Shifts are supposed to always shift in zeros or sign bits regardless of their inputs. It's possible the input value may have been replaced with undef by SimplifyDemandedBits, but the shift in zeros are still demanded.

This issue was reported to me by ispc from 10.0. Unfortunately their failing test does not fail on trunk. Seems to be because the shl is optimized out earlier now and doesn't become VSHLI.

ispc bug https://github.com/ispc/ispc/issues/1771

Differential Revision: https://reviews.llvm.org/D81212
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/vec_shift5.ll
Commit a080e345e439936d7f2d4733d0512c1b7d51e648 by Matthew.Arsenault
AMDGPU: Fix missing immarg on buffer.atomic.fadd intrinsic
The file was modifiedllvm/test/Verifier/AMDGPU/intrinsic-immarg.ll
The file was modifiedllvm/include/llvm/IR/IntrinsicsAMDGPU.td
Commit 43bb1c239c27de0ef9fdb8a43da1ef0bc16fc42a by Matthew.Arsenault
AMDGPU: Fix incorrect selection of buffer atomic fadd

There were additional standalone patterns for these nodes which were
missing the subtarget predicate.
The file was modifiedllvm/lib/Target/AMDGPU/BUFInstructions.td
The file was addedllvm/test/CodeGen/AMDGPU/fail-select-buffer-atomic-fadd.ll
Commit ee608478623a716da38cd09383f640f3a96f8d61 by Yaxun.Liu
Attempt to fix hip-include-path.hip
The file was modifiedclang/test/Driver/hip-include-path.hip
Commit f029c165f92ec897e8d99b4b85501dc89713b4d7 by thakis
[gn build] (manually) merge 5eedf07ab999d
The file was modifiedllvm/utils/gn/secondary/clang/test/BUILD.gn
Commit d2bd075e8d1f4544357c0ab9784ec4e88bd229a7 by maskray
Fix -Wunused-variable after D80515
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
Commit 72e4da45bd73e6cd16dbb564b2cc515bc8512e57 by jay.foad
Correctly report modified status for AMDGPUUnifyDivergentExitNodes

Related to https://reviews.llvm.org/D80916

Differential Revision: https://reviews.llvm.org/D81271
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
Commit 3aec298349fbc901a51b47004fb156090b3d6bce by sunfish
Revert "[WebAssembly] Improve clang diagnostics for wasm attributes"

It broke clang-check.

This reverts commit 931fcd3ba011c27626a95e5e35b657763284882a.
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was removedclang/test/Sema/attr-wasm.c
The file was removedclang/test/AST/ast-dump-wasm-attr-import.c
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was removedclang/test/AST/ast-dump-wasm-attr-export.c
Commit 6c570f789dc827960f3b8f6acddf0a07a7746673 by Matthew.Arsenault
GlobalISel: Add G_EXTRACT/G_INSERT offset to legalize info

Immediate legalize fields were added for G_SEXT_INREG. Simiarly, these
are likely not legal except for certain offsets.
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
The file was modifiedllvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
The file was modifiedllvm/include/llvm/Target/GenericOpcodes.td
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir