FailedChanges

Summary

  1. [libclang] Add translateCXRangeToCharRange conversion (details)
  2. [analyzer][StdLibraryFunctionsChecker] Add POSIX time handling functions (details)
  3. [DSE,MemorySSA] Remove some duplicated test functions. (details)
  4. [objdump][macho] Emit segment names along with section names (details)
  5. [tests][libFuzzer] Fix `-Wmissing-field-initializers` after D86092 (details)
  6. [lld] Test corrections after 3f1a9b7eca0 added segment names to objdump output (details)
  7. Fix the type of the invoke function in the block ABI documentation (details)
  8. [DSE,MemorySSA] Check for throwing instrs between killing/killed def. (details)
  9. [PowerPC] Allow const pointers for load builtins in altivec.h (details)
  10. [compiler-rt] Try to correct test after 3f1a9b7eca0 added segment names to objdump output (details)
  11. [ThinLTO][Legacy] Fix StringRef assertion from ThinLTO bots (details)
  12. [SCEV] Add tests for min/max intrinsics (NFC) (details)
  13. [ORC] Fix some bugs in TPCDynamicLibrarySearchGenerator, use in llvm-jitlink. (details)
  14. [LiveDebugVariables] Delete unneeded doInitialization (details)
  15. [libclang] Expose couple more AST details via cursors (details)
  16. [BDCE] Add tests for min/max intrinsincs (NFC) (details)
  17. [InstCombine] add test for assume in block with unreachable (PR47416); NFC (details)
  18. [InstCombine] rename tmp values to avoid scripted FileCheck conflicts; NFC (details)
  19. [X86] Prevent shuffle combining from creating an identical X86ISD::SHUF128. (details)
  20. [libclang] Add CXRewriter to libclang API (details)
  21. [gn build] Port 69e5abb57b7 (details)
  22. [InstSimplify] Add tests for min/max with dominating condition (NFC) (details)
  23. [libclang] Add missing dependency on clangRewrite lib (details)
  24. [Driver] Allow -specs and -nostartfiles to be forwarded to GCC (details)
  25. [Hexagon] Unindent everything in HexagonISelLowering.h, NFC (details)
  26. [compiler-rt] Try again to correct test after 3f1a9b7eca0 added segment names to objdump output (details)
  27. [compiler-rt] Add .clang-tidy with customization to disable readability-identifier-naming (details)
  28. [PowerPC] Provide vec_cmpne on pre-Power9 architectures in altivec.h (details)
  29. [PowerPC] Expand constrained ppc_fp128 to i32 conversion (details)
  30. Fix return status of SimplifyCFG (details)
  31. [SCCP] Add tests for intrinsic ranges (NFC) (details)
  32. [SelectionDAG] Always intersect SDNode flags during getNode() node memoization. (details)
  33. [InstCombine] Test abs with dominating condition (NFC) (details)
  34. [InstCombine] Add tests for cttz of abs intrinsic (NFC) (details)
  35. [InstCombine] Fold cttz of abs intrinsic (details)
  36. [InstCombine] Add tests for mul of abs intrinsic (NFC) (details)
  37. [InstCombine] Fold mul of abs intrinsic (details)
  38. Thread safety analysis: Document how try-acquire is handled (details)
  39. Set InvalidDecl directly when deserializing a Decl (details)
  40. [MLIR] Remove unused arg from affine tiling validity check (details)
  41. [InstCombine] Add tests for abs intrinsic eq zero (NFC) (details)
  42. [InstCombine] Fold abs intrinsic eq zero (details)
  43. [InstSimplify] Fold min/max based on dominating condition (details)
  44. [InstCombine] Fold abs with dominating condition (details)
  45. [SCEV] Recognize min/max intrinsics (details)
  46. Thread safety analysis: Consider global variables in scope (details)
  47. Thread safety analysis: ValueDecl in Project is non-null (details)
  48. [InstCombine] Add tests for known negative abs intrinsic (NFC) (details)
  49. Restore size of TemplateParameterList after D44352 (details)
  50. Attempt to fix Sphinx build failure, NFC (details)
  51. [ELF] Handle SHT_RISCV_ATTRIBUTES similarly to SHT_ARM_ATTRIBUTES (details)
  52. scan-build-py: fix multiprocessing error (details)
  53. [LangRef] Adjust guarantee for llvm.memcpy to also allow equal arguments. (details)
  54. [InstSimplify] Add tests for a peculiar abs of abs form (NFC) (details)
  55. [Hexagon] Handle widening of vector truncate (details)
  56. [NFC][compiler-rt] Refine .clang-tidy checks (details)
  57. [NFC][Asan] Rename internal enum value. (details)
  58. [NFC][Asan] Inline enum doc strings (details)
  59. [NFC][Asan] Reformat some allocator code (details)
  60. [Hexagon] Resize the mem operand when widening loads and stores (details)
  61. [Hexagon] When widening truncate result, also widen operand if necessary (details)
  62. [Hexagon] Add assertions about V6_pred_scalar2 (details)
  63. [AMDGPU] Remove the dead spill slots while spilling FP/BP to memory (details)
  64. [NFC][Asan] Move free_tid from ChunkHeader (details)
  65. [NFC][Asan] Fix clang-tidy warning (details)
  66. [Asan] Cleanup atomic usage in allocator (details)
  67. [GlobalISel] Disable the indexed loads combine completely unless forced. NFC. (details)
  68. Revert "[Asan] Cleanup atomic usage in allocator" (details)
  69. [Asan] Cleanup atomic usage in allocator (details)
Commit baf3c77bd9f6baf60a09ef3625fef84080642b72 by Jan Korous
[libclang] Add translateCXRangeToCharRange conversion

Add new conversion with clearly specified semantics.

https://reviews.llvm.org/D86990
The file was modifiedclang/tools/libclang/CIndex.cpp (diff)
The file was modifiedclang/tools/libclang/CXSourceLocation.h (diff)
Commit f0b9dbcfc7ba2a217cab3217d6217fc270c88b58 by gabor.marton
[analyzer][StdLibraryFunctionsChecker] Add POSIX time handling functions

Differential Revision: https://reviews.llvm.org/D84248
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp (diff)
The file was modifiedclang/test/Analysis/std-c-library-functions-arg-constraints.c (diff)
The file was modifiedclang/test/Analysis/std-c-library-functions-POSIX.c (diff)
Commit 51932fc6bde88d1798a6cdea1f3885164d5524d7 by flo
[DSE,MemorySSA] Remove some duplicated test functions.

Some tests from multibuild-malloc-free.ll do not actually use malloc or
free and where split out to multiblock-throwing.ll, but not removed from
the original file. This patch cleans that up. It also moves @test22 to
simple.ll, because it does not involve multiple blocks.
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-malloc-free.ll (diff)
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-throwing.ll (diff)
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll (diff)
Commit 3f1a9b7eca0a969e18aabefa3ceb9054b94c17c0 by daniel_l_sanders
[objdump][macho] Emit segment names along with section names

I recently came across a MachO with multiple sections of the same name but
different segments. We should emit the segment name alongside the section name
for MachO's.

Differential Revision: https://reviews.llvm.org/D87119
The file was modifiedllvm/test/tools/llvm-objdump/MachO/section-contents.test (diff)
The file was modifiedllvm/test/MC/AArch64/arm64_32-compact-unwind.s (diff)
The file was modifiedllvm/tools/llvm-objdump/llvm-objdump.cpp (diff)
Commit dde16ef031a0a9465444b0b02b9427709ef70651 by hubert.reinterpretcast
[tests][libFuzzer] Fix `-Wmissing-field-initializers` after D86092

Speculatively fix `-Werror,-Wmissing-field-initializers` failures
relating to the `ScalePerExecTime` field added by D86092.
The file was modifiedcompiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp (diff)
Commit 8760048384f545ae6f1d861cdbc95b1c76f41d9f by daniel_l_sanders
[lld] Test corrections after 3f1a9b7eca0 added segment names to objdump output
The file was modifiedlld/test/MachO/local-got.s (diff)
The file was modifiedlld/test/mach-o/do-not-emit-unwind-fde-arm64.yaml (diff)
The file was modifiedlld/test/mach-o/eh-frame-relocs-arm64.yaml (diff)
The file was modifiedlld/test/MachO/section-merge.s (diff)
The file was modifiedlld/test/MachO/x86-64-reloc-unsigned.s (diff)
The file was modifiedlld/test/MachO/relocations.s (diff)
The file was modifiedlld/test/MachO/sectcreate.s (diff)
The file was modifiedlld/test/MachO/weak-binding.s (diff)
Commit 64bb582f4a07d7195a6e6a44a34d166a06f0f071 by Akira
Fix the type of the invoke function in the block ABI documentation

rdar://problem/67892794
The file was modifiedclang/docs/Block-ABI-Apple.rst (diff)
Commit 00eb6fef0809ed143975ad16f3988a4fee13261b by flo
[DSE,MemorySSA] Check for throwing instrs between killing/killed def.

We also have to check all uses between the killing & killed def and
check if any of them is throwing.
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-malloc-free.ll (diff)
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-throwing.ll (diff)
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp (diff)
Commit 54205f0bd2377503b818d7f62cc4ed63ef5b1e94 by nemanja.i.ibm
[PowerPC] Allow const pointers for load builtins in altivec.h

The load builtins in altivec.h do not have const in the signature
for the pointer parameter. This prevents using them for loading
from constant pointers. A notable case for such a use is Eigen.

This patch simply adds the missing const.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=47408
The file was modifiedclang/lib/Headers/altivec.h (diff)
The file was modifiedclang/test/CodeGen/builtins-ppc-xl-xst.c (diff)
The file was modifiedclang/test/CodeGen/builtins-ppc-altivec.c (diff)
The file was modifiedclang/test/CodeGen/builtins-ppc-p10vector.c (diff)
Commit 1eae19a87f5432a60020d5a6affb0dc28a2a661b by daniel_l_sanders
[compiler-rt] Try to correct test after 3f1a9b7eca0 added segment names to objdump output
The file was modifiedcompiler-rt/test/asan/TestCases/Darwin/cstring_section.c (diff)
Commit 97866b8de81ce71cf9ae9e50feb450335b0537a0 by Steven Wu
[ThinLTO][Legacy] Fix StringRef assertion from ThinLTO bots

This is a presumed fix for FireFox thinLTO bot fix which hits assertion
failure for invalid index when access StringRef. Techinically, `IRName`
in the symtab should not be empty string for the entries we cared about
but this will help to fix the bot before more information can be
provided. Otherwise, NFCI.
The file was modifiedllvm/lib/LTO/ThinLTOCodeGenerator.cpp (diff)
Commit 6b50ce3ac95362bfe12aaa2b7bdbbef250f225fb by nikita.ppv
[SCEV] Add tests for min/max intrinsics (NFC)
The file was addedllvm/test/Analysis/ScalarEvolution/minmax-intrinsics.ll
Commit 3b64052a2572e69355969a59a0c4c8aba4fee887 by Lang Hames
[ORC] Fix some bugs in TPCDynamicLibrarySearchGenerator, use in llvm-jitlink.

TPCDynamicLibrarySearchGenerator was generating errors on missing
symbols, but that doesn't fit the DefinitionGenerator contract: A symbol
that isn't generated by a particular generator should not cause an
error.

This commit fixes the error by using SymbolLookupFlags::WeaklyReferencedSymbol
for all elements of the lookup, and switches llvm-jitlink to use
TPCDynamicLibrarySearchGenerator.
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/TargetProcessControl.h (diff)
The file was modifiedllvm/lib/ExecutionEngine/Orc/TPCDynamicLibrarySearchGenerator.cpp (diff)
The file was modifiedllvm/lib/ExecutionEngine/Orc/TargetProcessControl.cpp (diff)
The file was modifiedllvm/tools/llvm-jitlink/llvm-jitlink.cpp (diff)
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/TPCDynamicLibrarySearchGenerator.h (diff)
Commit 398ba37230431b6ab263cf91bf4c03e4f2c7acb8 by i
[LiveDebugVariables] Delete unneeded doInitialization
The file was modifiedllvm/lib/CodeGen/LiveDebugVariables.cpp (diff)
The file was modifiedllvm/lib/CodeGen/LiveDebugVariables.h (diff)
Commit 052f83890349822a606c916b2fee501bc087652b by Jan Korous
[libclang] Expose couple more AST details via cursors

Differential Revision: https://reviews.llvm.org/D86991
The file was modifiedclang/tools/libclang/CIndex.cpp (diff)
The file was modifiedclang/unittests/libclang/LibclangTest.cpp (diff)
The file was modifiedclang/tools/libclang/libclang.exports (diff)
The file was modifiedclang/include/clang-c/Index.h (diff)
Commit b3e139444f41e5c281972b4002c09ee0500831f6 by nikita.ppv
[BDCE] Add tests for min/max intrinsincs (NFC)
The file was addedllvm/test/Transforms/BDCE/intrinsics.ll
Commit c5d6b2b7e5769abfe9500c6dd6da89cd09a0348c by spatel
[InstCombine] add test for assume in block with unreachable (PR47416); NFC
The file was modifiedllvm/test/Transforms/InstCombine/assume.ll (diff)
Commit 35c6d56c0437f79b0f472b22e7353727a433881c by spatel
[InstCombine] rename tmp values to avoid scripted FileCheck conflicts; NFC
The file was modifiedllvm/test/Transforms/InstCombine/pr33689_same_bitwidth.ll (diff)
Commit 35b35a373d013df8e80c0c9840c085aa6a79c4dc by craig.topper
[X86] Prevent shuffle combining from creating an identical X86ISD::SHUF128.

This can cause an infinite loop if SimplifiedDemandedElts asks
for the node to replace itself.

A similar protection exists in other places in shuffle combining.

Fixes ISPC https://github.com/ispc/ispc/issues/1864
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-512-v16.ll (diff)
Commit 69e5abb57b70570cf04671a93246e5e624023650 by Jan Korous
[libclang] Add CXRewriter to libclang API

Differential Revision: https://reviews.llvm.org/D86992
The file was modifiedclang/tools/libclang/libclang.exports (diff)
The file was modifiedclang/unittests/libclang/LibclangTest.cpp (diff)
The file was modifiedclang/tools/libclang/CMakeLists.txt (diff)
The file was addedclang/tools/libclang/Rewrite.cpp
The file was addedclang/include/clang-c/Rewrite.h
Commit b07cbccf286831f5d32dddfd4e1da36bf48cbe58 by llvmgnsyncbot
[gn build] Port 69e5abb57b7
The file was modifiedllvm/utils/gn/secondary/clang/tools/libclang/BUILD.gn (diff)
Commit 781a43840863b85603a710857691a9b5032b0c27 by nikita.ppv
[InstSimplify] Add tests for min/max with dominating condition (NFC)
The file was modifiedllvm/test/Transforms/InstSimplify/maxmin_intrinsics.ll (diff)
Commit 7cfc8f0c7c2440ea8aa722304f9e6ef32472833b by Jan Korous
[libclang] Add missing dependency on clangRewrite lib

Differential Revision: https://reviews.llvm.org/D86992
The file was modifiedclang/tools/libclang/CMakeLists.txt (diff)
Commit 2bccd2b4350f887cc7fea1cc488690f58186c440 by pzheng
[Driver] Allow -specs and -nostartfiles to be forwarded to GCC

With 6a75496836ea14bcfd2f4b59d35a1cad4ac58cee, these two options are no longer
forwarded to GCC. This patch restores the original behavior.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D87162
The file was modifiedclang/include/clang/Driver/Options.td (diff)
The file was modifiedclang/test/Driver/gcc_forward.c (diff)
Commit 89a4fe79d4dde50a1daee1b433b1fa728ffeb0a4 by kparzysz
[Hexagon] Unindent everything in HexagonISelLowering.h, NFC

Just a shift, no other formatting changes.
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLowering.h (diff)
Commit 5e04b539c835cdc810cf0f75e87ca0c9b81d00e4 by daniel_l_sanders
[compiler-rt] Try again to correct test after 3f1a9b7eca0 added segment names to objdump output

One check was missed on the previous attempt
The file was modifiedcompiler-rt/test/asan/TestCases/Darwin/cstring_section.c (diff)
Commit a5d6af421d625c78bfb0f63830b51863ff0f0877 by i
[compiler-rt] Add .clang-tidy with customization to disable readability-identifier-naming

Copied from lldb/.clang-tidy (D75810).

Most compiler-rt code actually uses variableName or variable_name but not VariableName.
Lots of functions use `__function_name` and FunctionName instead of functionName.
Just exclude readability-identifier-naming.
The file was addedcompiler-rt/.clang-tidy
Commit 2d652949be4b772f2c11577621b0ad33052ac844 by nemanja.i.ibm
[PowerPC] Provide vec_cmpne on pre-Power9 architectures in altivec.h

These overloads are listed in appendix A of the ELFv2 ABI specification
without a requirement for ISA 3.0. So these need to be available on
all Altivec-capable architectures. The implementation in altivec.h
erroneously had them guarded for Power9 due to the availability of
the VCMPNE[BHW] instructions. However these need to be implemented
in terms of the VCMPEQ[BHW] instructions on older architectures.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=47423
The file was modifiedclang/test/CodeGen/builtins-ppc-altivec.c (diff)
The file was modifiedclang/lib/Headers/altivec.h (diff)
Commit 705271d9cd0e981b2df41cf2802880dcd5925281 by qiucofan
[PowerPC] Expand constrained ppc_fp128 to i32 conversion

Libcall __gcc_qtou is not available, which breaks some tests needing
it. On PowerPC, we have code to manually expand the operation, this
patch applies it to constrained conversion. To keep it strict-safe,
it's using the algorithm similar to expandFP_TO_UINT.

For constrained operations marking FP exception behavior as 'ignore',
we should set the NoFPExcept flag. However, in some custom lowering
the flag is missed. This should be fixed by future patches.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D86605
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.h (diff)
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.td (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/fp-strict-conv-f128.ll (diff)
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/ppcf128-constrained-fp-intrinsics.ll (diff)
Commit 3a6f3fc16039293920bfd6982052fd5fc14529e4 by sguelton
Fix return status of SimplifyCFG

When a switch case is folded into default's case, that's an IR change that
should be reported, update ConstantFoldTerminator accordingly.

Differential Revision: https://reviews.llvm.org/D87142
The file was addedllvm/test/Transforms/SimplifyCFG/merge-default.ll
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp (diff)
Commit 39caf9e94091629c65038b90215e24eea47a5ce5 by nikita.ppv
[SCCP] Add tests for intrinsic ranges (NFC)
The file was addedllvm/test/Transforms/SCCP/intrinsics.ll
Commit 714ceefad9b96ab3ef20913f2110883a1ad34a13 by paulsson
[SelectionDAG] Always intersect SDNode flags during getNode() node memoization.

Previously SDNodeFlags::instersectWith(Flags) would do nothing if Flags was
in an undefined state, which is very bad given that this is the default when
getNode() is called without passing an explicit SDNodeFlags argument.

This meant that if an already existing and reused node had a flag which the
second caller to getNode() did not set, that flag would remain uncleared.

This was exposed by https://bugs.llvm.org/show_bug.cgi?id=47092, where an NSW
flag was incorrectly set on an add instruction (which did in fact overflow in
one of the two original contexts), so when SystemZElimCompare removed the
compare with 0 trusting that flag, wrong-code resulted.

There is more that needs to be done in this area as discussed here:

Differential Revision: https://reviews.llvm.org/D86871

Review: Ulrich Weigand, Sanjay Patel
The file was modifiedllvm/include/llvm/CodeGen/SelectionDAGNodes.h (diff)
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp (diff)
The file was addedllvm/test/CodeGen/SystemZ/fp-mul-14.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.h (diff)
The file was addedllvm/test/CodeGen/SystemZ/int-cmp-60.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (diff)
Commit d401e376e464b97cabde1fa9c675630e7f275a1c by nikita.ppv
[InstCombine] Test abs with dominating condition (NFC)
The file was modifiedllvm/test/Transforms/InstCombine/abs-intrinsic.ll (diff)
Commit 1903a1afd947603bea37c40e249c7caa26087258 by nikita.ppv
[InstCombine] Add tests for cttz of abs intrinsic (NFC)
The file was modifiedllvm/test/Transforms/InstCombine/cttz-abs.ll (diff)
Commit 10cb23c6ca451374ebe2f31add236692e01637f3 by nikita.ppv
[InstCombine] Fold cttz of abs intrinsic

Same as the existing fold for SPF_ABS. We don't need to explicitly
handle the NABS variant, as we'll first fold away the neg in that
case.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp (diff)
The file was modifiedllvm/test/Transforms/InstCombine/cttz-abs.ll (diff)
Commit 3ab13348ba4c25f12254dd6c772f9fb1060b4425 by nikita.ppv
[InstCombine] Add tests for mul of abs intrinsic (NFC)
The file was modifiedllvm/test/Transforms/InstCombine/mul.ll (diff)
Commit 58b28fa7a2fd57051f3d2911878776d6f57b18d8 by nikita.ppv
[InstCombine] Fold mul of abs intrinsic

Same as the existing SPF_ABS fold. We don't need to explicitly
handle NABS, as the negs will get folded away first.
The file was modifiedllvm/test/Transforms/InstCombine/mul.ll (diff)
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp (diff)
Commit 8544defdcb09bbbbc25c5958e5f5b5762e9b9046 by aaronpuchert
Thread safety analysis: Document how try-acquire is handled

I don't think this is obvious, since try-acquire seemingly contradicts
our usual requirements of "no conditional locking".

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D87065
The file was modifiedclang/docs/ThreadSafetyAnalysis.rst (diff)
Commit 16975a638df3cda95c677055120b23e689d96dcd by aaronpuchert
Set InvalidDecl directly when deserializing a Decl

When parsing a C++17 binding declaration, we first create the
BindingDecls in Sema::ActOnDecompositionDeclarator, and then build the
DecompositionDecl in Sema::ActOnVariableDeclarator, so the contained
BindingDecls are never null. But when deserializing, we read the
DecompositionDecl with all properties before filling in the Bindings.
Among other things, reading a declaration reads whether it's invalid,
then calling setInvalidDecl which assumes that all bindings of the
DecompositionDecl are available, but that isn't the case.

Deserialization should just set all properties directly without invoking
subsequent functions, so we just set the flag without using the setter.

Fixes PR34960.

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D86207
The file was modifiedclang/lib/Serialization/ASTReaderDecl.cpp (diff)
The file was modifiedclang/test/PCH/cxx1z-decomposition.cpp (diff)
Commit 430b47a17d2281bd566fc1aac19de80b99e6f0c6 by uday
[MLIR] Remove unused arg from affine tiling validity check

Drop unused function arg from affine loop tiling validity check.
The file was modifiedmlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp (diff)
Commit 94c71d6aa1632170e27c60db4aa63c86e95bd450 by nikita.ppv
[InstCombine] Add tests for abs intrinsic eq zero (NFC)
The file was modifiedllvm/test/Transforms/InstCombine/icmp.ll (diff)
Commit ada8a17d945c17c5603e24824f642ca199412adf by nikita.ppv
[InstCombine] Fold abs intrinsic eq zero

Following the same transform for the select version of abs.
The file was modifiedllvm/test/Transforms/InstCombine/icmp.ll (diff)
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp (diff)
Commit 73104b0751a1c1dd499550bf44e47d29882fbb32 by nikita.ppv
[InstSimplify] Fold min/max based on dominating condition

If we have a dominating condition that x >= y, then umax(x, y) is x,
etc. I'm doing this in InstSimplify as the corresponding transform
for the select form is also done there.

Differential Revision: https://reviews.llvm.org/D87168
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp (diff)
The file was modifiedllvm/test/Transforms/InstSimplify/maxmin_intrinsics.ll (diff)
Commit 4892d3a1983b0fae83e9476d8cec1d139da7eae0 by nikita.ppv
[InstCombine] Fold abs with dominating condition

Similar to D87168, but for abs. If we have a dominating x >= 0
condition, then we know that abs(x) is x. This fold is in
InstCombine, because we need to create a sub instruction for
the x < 0 case.

Differential Revision: https://reviews.llvm.org/D87184
The file was modifiedllvm/test/Transforms/InstCombine/abs-intrinsic.ll (diff)
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp (diff)
Commit ac87480bd8beef0a4e93981e38df2c21652e1393 by nikita.ppv
[SCEV] Recognize min/max intrinsics

Recognize umin/umax/smin/smax intrinsics and convert them to the
already existing SCEV nodes of the same name.

In the future we'll want SCEVExpander to also produce the intrinsics,
but we're not ready for that yet.

Differential Revision: https://reviews.llvm.org/D87160
The file was modifiedllvm/test/Analysis/ScalarEvolution/minmax-intrinsics.ll (diff)
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp (diff)
Commit 9dcc82f34ea9b623d82d2577b93aaf67d36dabd2 by aaronpuchert
Thread safety analysis: Consider global variables in scope

Instead of just mutex members we also consider mutex globals.
Unsurprisingly they are always in scope. Now the paper [1] says that

> The scope of a class member is assumed to be its enclosing class,
> while the scope of a global variable is the translation unit in
> which it is defined.

But I don't think we should limit this to TUs where a definition is
available - a declaration is enough to acquire the mutex, and if a mutex
is really limited in scope to a translation unit, it should probably be
only declared there.

[1] https://static.googleusercontent.com/media/research.google.com/en/us/pubs/archive/42958.pdf

Fixes PR46354.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D84604
The file was modifiedclang/lib/Analysis/ThreadSafety.cpp (diff)
The file was modifiedclang/test/SemaCXX/warn-thread-safety-analysis.cpp (diff)
The file was modifiedclang/test/SemaCXX/warn-thread-safety-negative.cpp (diff)
Commit b2ce79ef66157dd752e3864ece57915e23a73f5d by aaronpuchert
Thread safety analysis: ValueDecl in Project is non-null

The constructor asserts that, use it in the ThreadSafetyAnalyzer.
Also note that the result of a cast<> cannot be null.
The file was modifiedclang/lib/Analysis/ThreadSafetyCommon.cpp (diff)
The file was modifiedclang/lib/Analysis/ThreadSafety.cpp (diff)
Commit 5ad6552a836ef759ff8a96ffec333aacabb8dc36 by nikita.ppv
[InstCombine] Add tests for known negative abs intrinsic (NFC)

And duplicate tests for known non-negative from InstSimplify.
The file was modifiedllvm/test/Transforms/InstCombine/abs-intrinsic.ll (diff)
Commit d3a779fe21500457e95c8c4e963638b93e3bcc71 by aaronpuchert
Restore size of TemplateParameterList after D44352

After adding a field of one bit, the bitfield members would take
30+1+1+1 = 33 bits, causing the size of TemplateParameterList to
increase from 16 to 24 bytes on 64-bit systems.

With 29 bits for NumParams we can encode up to half a billion template
parameters, which is almost certainly still enough for anybody.
The file was modifiedclang/include/clang/AST/DeclTemplate.h (diff)
Commit da6b3aa4c6bb29a150628ad489274466c6b8ace0 by aaronpuchert
Attempt to fix Sphinx build failure, NFC

A code block wasn't properly introduced.
The file was modifiedclang-tools-extra/docs/clang-tidy/checks/bugprone-redundant-branch-condition.rst (diff)
Commit bef38e86b4e702a0c42e243d323fb7c09875e649 by jrtc27
[ELF] Handle SHT_RISCV_ATTRIBUTES similarly to SHT_ARM_ATTRIBUTES

Currently we treat SHT_RISCV_ATTRIBUTES like a normal section and
concatenate all such input sections, yielding invalid output unless only
a single attributes section is present in the input. Instead, pick the
first as with SHT_ARM_ATTRIBUTES. We do not currently need to condition
our behaviour on the contents, unlike Arm. In future, we should both do
stricter validation of the input and merge all sections together to
ensure we have, for example, the full arch string requirement, but this
rudimentary implementation is good enough for most common cases.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D86309
The file was modifiedlld/ELF/SyntheticSections.h (diff)
The file was modifiedlld/ELF/InputFiles.cpp (diff)
The file was addedlld/test/ELF/riscv-attributes.s
Commit 0c642828612dbde30decff6fb080af4de9a173bd by lawrence_danna
scan-build-py: fix multiprocessing error

Recent versions of python3's multiprocessing module will blow up with
a Runtime error from this code, saying:

  An attempt has been made to start a new process before the
  current process has finished its bootstrapping phase

This is becuae the wrappers in bin/ are not using the  `__name__ == "__main__"`   idiom correctly.

Reviewed By: ldionne

Differential Revision: https://reviews.llvm.org/D87051
The file was modifiedclang/tools/scan-build-py/bin/intercept-build (diff)
The file was modifiedclang/tools/scan-build-py/bin/analyze-build (diff)
The file was modifiedclang/tools/scan-build-py/bin/scan-build (diff)
Commit 1ddb3a369f7ebdf738486cd60261c3143658c0e6 by flo
[LangRef] Adjust guarantee for llvm.memcpy to also allow equal arguments.

This adjusts the description of `llvm.memcpy` to also allow operands
to be equal. This is in line with what Clang currently expects.

This change is intended to be temporary and followed by re-introduce
a variant with the non-overlapping guarantee for cases where we can
actually ensure that property in the front-end.

See the links below for more details:
http://lists.llvm.org/pipermail/cfe-dev/2020-August/066614.html
and PR11763.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D86815
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll (diff)
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp (diff)
The file was modifiedllvm/test/Analysis/BasicAA/assume.ll (diff)
The file was modifiedllvm/test/Analysis/BasicAA/cs-cs.ll (diff)
The file was modifiedllvm/docs/LangRef.rst (diff)
The file was modifiedllvm/test/Analysis/MemorySSA/basicaa-memcpy.ll (diff)
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/memset-and-memcpy.ll (diff)
The file was modifiedllvm/test/Analysis/BasicAA/guards.ll (diff)
Commit 621b10ca187bdd6de691338e48b288ea1c6a5822 by nikita.ppv
[InstSimplify] Add tests for a peculiar abs of abs form (NFC)

This pattern shows up when canonicalizing to spf abs form to
intrinsic abs form.
The file was modifiedllvm/test/Transforms/InstSimplify/abs_intrinsic.ll (diff)
Commit 1387f96ab3310678df62c1073346ca387a85f656 by kparzysz
[Hexagon] Handle widening of vector truncate
The file was addedllvm/test/CodeGen/Hexagon/autohvx/isel-widen-store.ll
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLowering.h (diff)
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp (diff)
The file was modifiedllvm/test/CodeGen/Hexagon/autohvx/isel-truncate.ll (diff)
The file was addedllvm/test/CodeGen/Hexagon/autohvx/isel-widen-truncate.ll
The file was removedllvm/test/CodeGen/Hexagon/autohvx/short-store-widen.ll
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLowering.cpp (diff)
The file was modifiedllvm/lib/Target/Hexagon/HexagonPatternsHVX.td (diff)
Commit 298c9fae9370598a37896c002da6250c3b1a2313 by Vitaly Buka
[NFC][compiler-rt] Refine .clang-tidy checks

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D87182
The file was addedcompiler-rt/test/.clang-tidy
The file was removedcompiler-rt/lib/sanitizer_common/.clang-tidy
The file was modifiedcompiler-rt/.clang-tidy (diff)
Commit 51597cc37a2679ebd7f0236adabffbd94506a5f1 by Vitaly Buka
[NFC][Asan] Rename internal enum value.

New name better represents the state of chunk.
The file was modifiedcompiler-rt/lib/asan/asan_allocator.cpp (diff)
Commit 398c44ba84e10dec1224365065615b08be106e1f by Vitaly Buka
[NFC][Asan] Inline enum doc strings
The file was modifiedcompiler-rt/lib/asan/asan_allocator.cpp (diff)
Commit d5d09d93ee1494630654c487d9464771dba4e4d2 by Vitaly Buka
[NFC][Asan] Reformat some allocator code
The file was modifiedcompiler-rt/lib/asan/asan_allocator.cpp (diff)
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_allocator_combined.h (diff)
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h (diff)
Commit 8789f2bbde8fe540a74d80d6e48eb466f8a9d6ea by kparzysz
[Hexagon] Resize the mem operand when widening loads and stores
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp (diff)
The file was addedllvm/test/CodeGen/Hexagon/autohvx/isel-widen-memop.ll
Commit 9518f032e49280d973dcae9e1ff460b1f98cc9df by kparzysz
[Hexagon] When widening truncate result, also widen operand if necessary
The file was addedllvm/test/CodeGen/Hexagon/autohvx/isel-widen-truncate-op.ll
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp (diff)
Commit 62f89a89f312045f26ec74b73512e2080df35875 by kparzysz
[Hexagon] Add assertions about V6_pred_scalar2
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp (diff)
Commit aff94ec0f4ded3eff2d5c0431f5fec9e41731b05 by VenkataRamanaiah.Nalamothu
[AMDGPU] Remove the dead spill slots while spilling FP/BP to memory

During the PEI pass, the dead TargetStackID::SGPRSpill spill slots
are not being removed while spilling the FP/BP to memory.

Fixes: SWDEV-250393

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D87032
The file was modifiedllvm/test/CodeGen/AMDGPU/callee-frame-setup.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/stack-realign.ll (diff)
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.cpp (diff)
Commit 9128f5c8a719095f12a8864a2b81395c70a321b3 by Vitaly Buka
[NFC][Asan] Move free_tid from ChunkHeader

The goal to make chunk_state atomic, but we can't pack it with
free_tid on Windows.
The file was modifiedcompiler-rt/lib/asan/asan_allocator.cpp (diff)
Commit 289c08e4bc6b848a70d6cdefafa21a2e91e2c5f7 by Vitaly Buka
[NFC][Asan] Fix clang-tidy warning
The file was modifiedcompiler-rt/lib/asan/asan_allocator.cpp (diff)
Commit eb87e1dbcfdf15c0711146ff3e6b2e1e40c8863a by Vitaly Buka
[Asan] Cleanup atomic usage in allocator

There are no know bugs related to this, still it may fix some latent ones.
Main concerns with preexisting code:
1. Inconsistent atomic/non-atomic access to the same field.
2. Assumption that bitfield chunk_state is always the first byte without
    even taking into account endianness.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D86917
The file was modifiedcompiler-rt/lib/asan/asan_allocator.cpp (diff)
Commit d0abc757495349fd053beeaea81cd954c2e457e7 by Amara Emerson
[GlobalISel] Disable the indexed loads combine completely unless forced. NFC.

The post-index matcher, before it queries the target legality, walks uses
of some instructions which in pathological cases can be massive. Since
no targets actually support indexed loads yet, disable this to stop wasting
compile time on something which is going to fail anyway.
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp (diff)
Commit b2e27a86c18e13043be0ed7bf2855d313cc0ac38 by Vitaly Buka
Revert "[Asan] Cleanup atomic usage in allocator"

Crashes on PPC

This reverts commit eb87e1dbcfdf15c0711146ff3e6b2e1e40c8863a.
The file was modifiedcompiler-rt/lib/asan/asan_allocator.cpp (diff)
Commit b11db3606ca180521f8400aed730281108b350b4 by Vitaly Buka
[Asan] Cleanup atomic usage in allocator

There are no know bugs related to this, still it may fix some latent ones.
Main concerns with preexisting code:
1. Inconsistent atomic/non-atomic access to the same field.
2. Assumption that bitfield chunk_state is always the first byte without
    even taking into account endianness.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D86917
The file was modifiedcompiler-rt/lib/asan/asan_allocator.cpp (diff)