Changes

Summary

  1. [DebugInfo][LSR] Avoid crashes on large integer inputs (details)
  2. [AMDGPU] Add cttz tests and globalisel checks for ctlz (details)
  3. [PowerPC][AIX] Packed zero-width bitfields do not affect alignment. (details)
  4. [AArch64] Fix assert AArch64TargetLowering::ReplaceNodeResults (details)
  5. [AMDGPU][OpenMP] Wrap amdgcn declare variant inside ifdef (details)
  6. [mlir][amx] add doc to AMX dialect (details)
  7. [AArch64][SVE] Combine bitcasts of predicate types with vector inserts/extracts of loads/stores (details)
  8. [mlir][sparse] fixed typo in sparse tensor type attribute alias (details)
  9. [ELF] Make dot in .tbss correct (details)
  10. [openmp] Add OMPT initialization in libomptarget (details)
  11. [ELF] Apply version script patterns to non-default version symbols (details)
  12. tsan: introduce kAccessFree (details)
  13. tsan: introduce kAccessExternalPC (details)
  14. tsan: move AccessType to tsan_defs.h (details)
  15. tsan: remove non-existent MemoryAccessRangeStep (details)
  16. [ELF] Combine foo@v1 and foo with the same versionId if both are defined (details)
  17. [clang][AArch64][SVE] Avoid going through memory for fixed/scalable predicate casts (details)
  18. [InstCombine] Fix vscale zext/sext optimization when vscale_range is unbounded. (details)
  19. [CSSPGO] Migrate and refactor the decoder of Pseudo Probe (details)
  20. [ELF] Fix typo. NFC (details)
  21. [OpenMP] Fix performance regression reported in bug #51235 (details)
  22. [OpenMP] Clean up for hidden helper task (details)
  23. [X86][SchedModel] Add missing ReadAdvance for some arithmetic ops (PR51318 and PR51322). (details)
  24. [Bazel] Update build for ee7d20e846 (details)
  25. [InstrProfiling] Emit bias variable eagerly (details)
  26. [AArch64][GlobalISel] Widen G_FPTO*I before clamping (details)
  27. [AArch64][GlobalISel] Widen G_PHI before clamping it during legalization (details)
  28. [gn build] (manually) port ee7d20e84675e1d255d7ae59e3bccfd320cc090d (details)
  29. [gn build] Port ee7d20e84675 (details)
  30. [mlir][sparse] add doc to sparse tensor dialect passes (details)
  31. [RISCV] Remove the _COMMUTABLE and _TA versions of FMA and wide FMA vector instructions. (details)
  32. [DSE][NFC] Clean up DeadStoreElimination from unused variables (details)
  33. Revert "[AMDGPU] Handle functions in llvm's global ctors and dtors list" (details)
  34. Work around non-existence of ElfW(type) macro on FreeBSD (details)
  35. [hwasan] Add __hwasan_init constructor to runtime lib. (details)
  36. Revert "[SLP]Do not emit extra shuffle for insertelements vectorization." (details)
  37. [nfc] [lldb] Prevent needless copies of DataExtractor (details)
  38. [RISCV] Add test cases for conditional add/sub. NFC (details)
  39. [DAGCombiner][AMDGPU] Canonicalize constants to the RHS of MULHU/MULHS. (details)
  40. [OpenMPOpt] Expand SPMDization with guarding for target parallel regions (details)
  41. [SLP][NFC]Add tests for constants/undefs used in insertelements, NFC. (details)
  42. [gn build] Add cfi ignorelist to compiler-rt/lib (details)
  43. [MLIR][NFC] Get DiagnosticEngine as a reference in doc (details)
  44. [MemCpyOpt] Relax libcall checks (details)
  45. [flang] Support DFLOAT legacy extension intrinsic function (details)
  46. [flang] runtime: For Fw.d formatting, don't oscillate forever (details)
  47. [amdgpu] Add an enhanced conversion from i64 to f32. (details)
  48. [CodeGen] Add -align-loops (details)
  49. [lld] Remove unused LLD_REPOSITORY (details)
  50. [libc] add integration tests for scudo in libc (details)
  51. [mlir-lsp-server] Only use one MLIRContext per MLIRTextFile (details)
  52. [Bazel] Drop deprecated tblgen includes mechanism (details)
  53. [X86] Remove -x86-experimental-pref-loop-alignment in favor of -align-loops (details)
  54. [WebAssembly] Make result of 'catch' inst variadic (details)
  55. [llvm-nm][test] Avoid deprecated alias -M (--print-armap) (details)
  56. [OpenCL] allow generic address and non-generic defs for CL3.0 (details)
  57. [mlir][sparse] Remove comment w/ code in it (details)
  58. [gwpAsan] revert minor change (details)
  59. Apply -fmacro-prefix-map to __builtin_FILE() (details)
  60. [AArch64][GlobalISel] Legalize wide vector G_PHIs (details)
  61. Adding missing filter check to SourceMgrDiagnosticHandler::EmitDiagnostics (details)
  62. BPF: avoid NE/EQ loop exit condition (details)
  63. [CSSPGO] Remove used of PseudoProbeAttributes::Reserved (details)
  64. [libFuzzer] tests/examples for using libFuzzer for out-of-process targets (details)
  65. [Bazel] Add support for lld (details)
  66. [CMake][gn] lldMachO=>lldMachOOld, lldMachO2=>lldMachO (details)
  67. [mlir] Update comment in Region.h (details)
  68. [AVR] emit 'MCSA_Global' references to '__do_global_ctors' and '__do_global_dtors' (details)
  69. [Compiler-RT] On Apple Platforms switch to always emitting full debug info (details)
  70. Disable LibFuncs for stpcpy and stpncpy for Android < 21 (details)
  71. [mlir] Clean up includes in Transforms/Passes.h (details)
  72. [WebAssembly] Use `SDValue::getConstantOperandVal` (NFC) (details)
  73. [WebAssembly] Cleanup Emscripten SjLj tests (details)
  74. [NFCI] [LoopIdiom] Let processLoopStridedStore take StoreSize as SCEV instead of unsigned (details)
  75. Revert "[ELF] Apply version script patterns to non-default version symbols" (details)
  76. [ELF] Apply version script patterns to non-default version symbols (details)
  77. [ARM][llvm-objdump] Annotate PC-relative memory operands (details)
  78. [ARM][llvm-objdump] Annotate PC-relative memory operands of VLDR instructions (details)
  79. [llvm] [lit] Fix inconsistent test order in shtest-keyword-parse-errors (details)
  80. [llvm-rc] Allow specifying language with a leading 0x prefix (details)
  81. D106035: Remove conditional compilation for WCHAR support in libedit (details)
  82. [clang] Add clang builtins support for gfx90a (details)
  83. [AMDGPU] Make more use of getHiHalf64 and split64BitValue. NFCI. (details)
  84. [llvm-jitlink] Don't try to guess the ORC runtime path. (details)
  85. [SelectionDAG] Correctly determine the VECREDUCE_SEQ_FMUL action (details)
  86. Mark tests as requiring AMDGPU target (details)
  87. [AMDGPU] Generate checks for ctlz_zero_undef/cttz_zero_undef (details)
  88. Revert "D106035: Remove conditional compilation for WCHAR support in libedit" (details)
  89. [OpenCL] Reduce duplicate defs by using multiclasses; NFC (details)
  90. [flang][driver] Refactor boolean options (details)
  91. Correct a lot of diagnostic wordings for the driver (details)
  92. tsan: make IsMetaMem accept u32* (details)
  93. tsan: introduce RawShadow type (details)
  94. [GlobalISel] Combine shr(shl x, c1), c2 to G_SBFX/G_UBFX (details)
  95. [X86] Rename Subtarget Tuning Feature Flag Prefix. NFC. (details)
  96. [AMDGPU] Add globalisel checks for ctlz_zero_undef/cttz_zero_undef (details)
  97. [flang][driver] Delete `f18` (i.e. the old Flang driver) (details)
  98. GlobalISel: Fix matchEqualDefs for instructions with multiple defs (details)
  99. [VectorCombine] Add additional tests with freeze combinations. (details)
  100. Add a DIExpression const-folder to prevent silly expressions. (details)
  101. [NFC] Remove redundant test in Transforms/LoopVectorize/lifetime.ll (details)
  102. [LV] Remove a change that was added in D106164. (details)
  103. [DA] control compile-time spent by MIV tests (details)
  104. [PowerPC][AIX] Limit attribute aligned to 4096. (details)
  105. [NFC] Clean up tests in test/Transforms/LoopVectorize/assume.ll (details)
  106. Delay initialization of OptBisect (details)
  107. [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation (details)
  108. Revert "[SystemZ][z/OS] Update target specific __attribute__((aligned)) value for test" (details)
  109. [LoopVectorize] Add support for replication of more intrinsics with scalable vectors (details)
  110. [BuildLibCalls][NFC] Remove redundant attribute list from emitCalloc (details)
  111. [VectorCombine] Limit scalarization known non-poison indices. (details)
  112. [DAG] DAGCombiner::visitVECTOR_SHUFFLE - recognise INSERT_SUBVECTOR patterns (details)
  113. [clang] [clang-repl] Fix linking against LLVMLineEditor (details)
  114. tsan: modernize MaybeReportThreadLeak (details)
  115. tsan: handle bugs in symbolizer more gracefully (details)
  116. [SimpifyCFG] Speculate a store preceded by a local non-escaping load (details)
  117. tsan: don't include tsan_interceptors.h for Go (details)
  118. tsan: qualify autos (details)
  119. tsan: pass thr/pc to MemoryResetRange (details)
  120. [AMDGPU][SDag] Better lowering for 64-bit ctlz/cttz (details)
  121. [AMDGPU][SDag] Better lowering for 32-bit ctlz/cttz (details)
  122. [NFC][LoopIdiom] rename boolean variable NegStride to IsNegStride (details)
  123. [PowerPC][AIX] attribute aligned cannot decrease align of a vector var. (details)
  124. [LV] Consider ExtractValue as uniform. (details)
  125. Fix build issues caused by 95800da914938129083df2fa0165c1901909c273 (details)
  126. [DAGCombiner][RISCV][AMDGPU] Call SimplifyDemandedBits at the end of visitMULHU to enable known bits contant folding. (details)
  127. [SLP]Do not emit extra shuffle for insertelements vectorization. (details)
  128. [Transforms] Drop unnecessary const from return types (NFC) (details)
  129. Fix signal during the call to checkOpenMPLoop. (details)
  130. [SLP] Add additional memory version tests. (details)
  131. Add llvm-stress binary to Bazel build configuration. (details)
  132. [AArch64][GlobalISel] Mark v16s8 <- v8s8, v8s8 G_CONCAT_VECTOR as legal (details)
  133. Revert "[X86] combineX86ShuffleChain(): canonicalize mask elts picking from splats" (details)
  134. Fix clang-interpreter build after 2487db1f286222e2501c2fa8e8244eda13f6afc3 (details)
  135. [llvm-ar] Fix for handling thin archive with SYM64 and a test case for it (details)
  136. Fix COMPILER_RT_DEBUG build for targets that don't support thread local storage. (details)
  137. [lldb] Use a struct to pass function search options to Module::FindFunction (details)
  138. [lldb] Refactor IRExecutionUnit::FindInSymbols (NFC) (details)
  139. [ELF] Support copy relocation on non-default version symbols (details)
  140. [llvm-diff] Create libLLVMDiff library (details)
  141. [NFC][Codegen][X86] Add testcase that hanged after D107009 (details)
  142. [NFC][X86] combineX86ShuffleChain(): hoist Mask variable higher up (details)
  143. [clang] Replace asm with __asm__ in cuda header (details)
  144. Remove unintended commit. (details)
  145. [libc] Add diff and perf targets for more math functions (details)
  146. [Bazel] Update for 9854f2f30f (Diff library) (details)
  147. sanitizer_common: disable thread safety annotations for googletest (details)
  148. Revert "[llvm-diff] Create libLLVMDiff library" (details)
  149. {DebugInfo][LSR] Don't cache dbg.value that are already undef (details)
  150. [libc++] IWYU to fix complaints when compiling with Modules. NFCI. (details)
Commit 21ee38e24f9801a567306b2a88defacf6e589a8b by chris.jackson
[DebugInfo][LSR] Avoid crashes on large integer inputs

SCEV-based salvaging in LSR translates SCEVs to DIExpressions. SCEVs may
contain very large integers but the translation does not support
integers greater than 64 bits. This patch adds checks to ensure
conversions of these large integers is not attempted. A regression test
is added to ensure no such translation is attempted.

Reviewed by: StephenTozer

PR: https://bugs.llvm.org/show_bug.cgi?id=51329

Differential Revision: https://reviews.llvm.org/D107438
The file was modifiedllvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
The file was addedllvm/test/Transforms/LoopStrengthReduce/pr51329.ll
Commit ba5c4ac60090052836418dca7c7f1b7d7ed18dcc by jay.foad
[AMDGPU] Add cttz tests and globalisel checks for ctlz
The file was modifiedllvm/test/CodeGen/AMDGPU/ctlz.ll
The file was addedllvm/test/CodeGen/AMDGPU/cttz.ll
Commit b8f612e780e50cfb62bc0196b6367e4587949f88 by sd.fertile
[PowerPC][AIX] Packed zero-width bitfields do not affect alignment.

Zero-width bitfields on AIX pad out to the natral alignment boundary but
do not change the containing records alignment.

Differential Revision: https://reviews.llvm.org/D106900
The file was modifiedclang/test/Layout/aix-packed-bitfields.c
The file was modifiedclang/lib/AST/RecordLayoutBuilder.cpp
Commit 926975267175eeef921c6f84e25c93b00a359a05 by simon.wallis2
[AArch64] Fix assert AArch64TargetLowering::ReplaceNodeResults

Don't know how to custom expand this
UNREACHABLE executed at llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:16788

The fix is to provide missing expansions for:
  case ISD::STRICT_FP_TO_UINT:
  case ISD::STRICT_FP_TO_SINT:

A test case is provided.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D107452
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was addedllvm/test/CodeGen/AArch64/fptosi-strictfp.ll
Commit f3eb5f900d2ae6c8e1c03d1b250415a7b7aa39b1 by Pushpinder.Singh
[AMDGPU][OpenMP] Wrap amdgcn declare variant inside ifdef

This fixes the issue https://bugs.llvm.org/show_bug.cgi?id=51337

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D107468
The file was modifiedclang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h
Commit 478c71bf95d2e88297e01d450e0c10c847cb8037 by ajcbik
[mlir][amx] add doc to AMX dialect

Making sure the AMX dialect webpage reads better with a short introduction on the purpose of this dialect.

Reviewed By: grosul1, bondhugula

Differential Revision: https://reviews.llvm.org/D107419
The file was modifiedmlir/include/mlir/Dialect/AMX/AMX.td
Commit d9cc5d84e4d3bf45df1ef87e677e3ec1431b59b5 by bradley.smith
[AArch64][SVE] Combine bitcasts of predicate types with vector inserts/extracts of loads/stores

An insert subvector that is inserting the result of a vector predicate
sized load into undef at index 0, whose result is casted to a predicate
type, can be combined into a direct predicate load. Likewise the same
applies to extract subvector but in reverse.

The purpose of this optimization is to clean up cases that will be
introduced in a later patch where casts to/from predicate types from i8
types will use insert subvector, rather than going through memory early.

This optimization is done in SVEIntrinsicOpts rather than InstCombine to
re-introduce scalable loads as late as possible, to give other
optimizations the best chance possible to do a good job.

Differential Revision: https://reviews.llvm.org/D106549
The file was addedllvm/test/CodeGen/AArch64/sve-insert-vector-to-predicate-load.ll
The file was addedllvm/test/CodeGen/AArch64/sve-extract-vector-to-predicate-store.ll
The file was modifiedllvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
Commit b4a1eab941bda4c56dca685749b59a99076caebe by ajcbik
[mlir][sparse] fixed typo in sparse tensor type attribute alias

Reviewed By: grosul1, rriddle

Differential Revision: https://reviews.llvm.org/D107472
The file was modifiedmlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td
Commit 9bd29a73d17add45234a35de5f6ad7ca8321f7f9 by i
[ELF] Make dot in .tbss correct

GNU ld doesn't support multiple SHF_TLS SHT_NOBITS output sections (it restores
the address after an SHF_TLS SHT_NOBITS section, so consecutive SHF_TLS
SHT_NOBITS sections will have conflicting address ranges).

That said, `threadBssOffset` implements limited support for consecutive SHF_TLS
SHT_NOBITS sections. (SHF_TLS SHT_PROGBITS following a SHF_TLS SHT_NOBITS can still be
incorrect.)

`.` in an output section description of an SHF_TLS SHT_NOBITS section is
incorrect. (https://lists.llvm.org/pipermail/llvm-dev/2021-July/151974.html)

This patch saves the end address of the previous tbss section in
`ctx->tbssAddr`, changes `dot` in the beginning of `assignOffset` so
that `.` evaluation will be correct.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D107208
The file was modifiedlld/ELF/LinkerScript.h
The file was modifiedlld/ELF/LinkerScript.cpp
The file was modifiedlld/test/ELF/linkerscript/tbss.s
Commit 3bc8ce5dd718beef0031bf4b070ac4026e6910d7 by protze
[openmp] Add OMPT initialization in libomptarget

When loading libomptarget, the init function in libomptarget/src/rtl.cpp
will search for the libomptarget_start_tool function using libdl.
libomptarget_start_tool will pass those OMPT callbacks related to target
constructs to libomptarget

Differential Revision: https://reviews.llvm.org/D99803
The file was modifiedopenmp/runtime/src/ompt-event-specific.h
The file was modifiedopenmp/runtime/src/ompt-general.cpp
The file was modifiedopenmp/runtime/src/ompt-internal.h
The file was modifiedopenmp/runtime/cmake/config-ix.cmake
The file was addedopenmp/libomptarget/src/ompt-target.cpp
The file was modifiedopenmp/libomptarget/CMakeLists.txt
The file was modifiedopenmp/libomptarget/src/rtl.cpp
The file was modifiedopenmp/libomptarget/src/CMakeLists.txt
The file was modifiedopenmp/runtime/src/include/omp-tools.h.var
The file was addedopenmp/libomptarget/src/ompt-target.h
The file was modifiedopenmp/runtime/src/exports_so.txt
Commit 7ed22a6fa90cbdc70d6806c1121a0c50c1978dce by i
[ELF] Apply version script patterns to non-default version symbols

Currently version script patterns are ignored for .symver produced
non-default version (single @) symbols. This makes such symbols
not localizable by `local:`, e.g.

```
.symver foo3_v1,foo3@v1
.globl foo_v1
foo3_v1:

ld.lld --version-script=a.ver -shared a.o
# In a.out, foo3@v1 is incorrectly exported.
```

This patch adds the support:

* Move `config->versionDefinitions[VER_NDX_LOCAL].patterns` to `config->versionDefinitions[versionId].localPatterns`
* Rename `config->versionDefinitions[versionId].patterns` to `config->versionDefinitions[versionId].nonLocalPatterns`
* Allow `findAllByVersion` to find non-default version symbols when `includeNonDefault` is true. (Note: `symtab` keys do not have `@@`)
* Make each pattern check both the unversioned `pat.name` and the versioned `${pat.name}@${v.name}`
* `localPatterns` can localize `${pat.name}@${v.name}`. `nonLocalPatterns` can prevent localization by assigning `verdefIndex` (before `parseSymbolVersion`).

---

If a user notices new `undefined symbol` errors with a version script containing
`local: *;`, the issue is likely due to a missing `global:` pattern.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D107234
The file was modifiedlld/test/ELF/version-script-symver.s
The file was modifiedlld/ELF/Driver.cpp
The file was removedlld/test/ELF/version-script-extern-wildcards.s
The file was modifiedlld/ELF/SymbolTable.cpp
The file was removedlld/test/ELF/version-script-extern-exact.s
The file was addedlld/test/ELF/version-script-symver-extern.s
The file was removedlld/test/ELF/version-script-extern.s
The file was modifiedlld/ELF/Config.h
The file was modifiedlld/ELF/Symbols.cpp
The file was modifiedlld/test/ELF/version-script-noundef.s
The file was modifiedlld/ELF/SymbolTable.h
The file was modifiedlld/ELF/ScriptParser.cpp
Commit d41233e9cf12b85b4f856fe6f4c881211b29534c by dvyukov
tsan: introduce kAccessFree

Add kAccessFree memory access flag (similar to kAccessVptr).
In preparation for MemoryAccess refactoring.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D107464
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp
Commit 2ddaffdc74ec4e17d2df93729a2f20ec773f08f5 by dvyukov
tsan: introduce kAccessExternalPC

Add kAccessExternal memory access flag that denotes
memory accesses with PCs that may have kExternalPCBit set.
In preparation for MemoryAccess refactoring.
Currently unused, but will allow to skip a branch.

Depends on D107464.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D107465
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interface.inc
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.h
Commit c2598be8bcf2cf27391b9e77f9b509e24788e7a1 by dvyukov
tsan: move AccessType to tsan_defs.h

It will be needed in more functions like ReportRace
(the plan is to pass it through MemoryAccess to ReportRace)
and this move will allow to split the huge tsan_rtl.h into parts
(e.g. move FastState/Shadow definitions to a separate header).

Depends on D107465.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D107466
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_defs.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.h
Commit bdeb15c34eac9884f48a324004708e66ff76557b by dvyukov
tsan: remove non-existent MemoryAccessRangeStep

Probably was used for Go at some point...

Depends on D107466.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D107467
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.h
Commit 66d4430492131a2205f159071c15e90c10e2fced by i
[ELF] Combine foo@v1 and foo with the same versionId if both are defined

Due to an assembler design flaw (IMO), `.symver foo,foo@v1` produces two symbols `foo` and `foo@v1` if `foo` is defined.

* `v1 {};` produces both `foo` and `foo@v1`, but GNU ld only produces `foo@v1`
* `v1 { foo; };` produces both `foo@@v1` and `foo@v1`, but GNU ld only produces `foo@v1`
* `v2 { foo; };` produces both `foo@@v2` and `foo@v1`, matching GNU ld. (Tested by symver.s)

This patch implements the GNU ld behavior by reusing the symbol redirection mechanism
in D92259. The new test symver-non-default.s checks the first two cases.

Without the patch, the second case will produce `foo@v1` and `foo@@v1` which
looks weird and makes foo unnecessarily default versioned.

Note: `.symver foo,foo@v1,remove` exists but the unfortunate `foo` will not go
away anytime soon.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D107235
The file was addedlld/test/ELF/symver-non-default.s
The file was modifiedlld/test/ELF/version-symbol-undef.s
The file was modifiedlld/ELF/Driver.cpp
The file was modifiedlld/test/ELF/version-script-symver.s
Commit e57e1e4e00264b77b2b35ad2bf419a48aecdd6bc by bradley.smith
[clang][AArch64][SVE] Avoid going through memory for fixed/scalable predicate casts

For fixed SVE types, predicates are represented using vectors of i8,
where as for scalable types they are represented using vectors of i1. We
can avoid going through memory for casts between these by bitcasting the
i1 scalable vectors to/from a scalable i8 vector of matching size, which
can then use the existing vector insert/extract logic.

Differential Revision: https://reviews.llvm.org/D106860
The file was modifiedclang/lib/CodeGen/CGExprScalar.cpp
The file was modifiedclang/lib/CodeGen/CGCall.cpp
The file was modifiedclang/test/CodeGen/attr-arm-sve-vector-bits-call.c
The file was modifiedclang/test/CodeGen/attr-arm-sve-vector-bits-globals.c
The file was modifiedclang/test/CodeGen/attr-arm-sve-vector-bits-bitcast.c
The file was modifiedclang/test/CodeGen/attr-arm-sve-vector-bits-codegen.c
The file was modifiedclang/test/CodeGen/attr-arm-sve-vector-bits-cast.c
Commit fe6ae81ef3644bf216c9ca8d2c90150cd9f83a57 by sander.desmalen
[InstCombine] Fix vscale zext/sext optimization when vscale_range is unbounded.

According to the LangRef, a (vscale_range) value of 0 means unbounded.

This patch additionally cleans up the test file vscale_sext_and_zext.ll.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
The file was modifiedllvm/test/Transforms/InstCombine/vscale_sext_and_zext.ll
Commit ee7d20e84675e1d255d7ae59e3bccfd320cc090d by hoy
[CSSPGO] Migrate and refactor the decoder of Pseudo Probe

Migrate pseudo probe decoding logic in llvm-profgen to MC, so other LLVM-base program could reuse existing codes. Redesign object layout of encoded and decoded pseudo probes.

Reviewed By: hoy

Differential Revision: https://reviews.llvm.org/D106861
The file was modifiedllvm/include/llvm/MC/MCPseudoProbe.h
The file was modifiedllvm/lib/MC/CMakeLists.txt
The file was modifiedllvm/tools/llvm-profgen/CMakeLists.txt
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
The file was removedllvm/tools/llvm-profgen/PseudoProbe.cpp
The file was modifiedllvm/lib/MC/MCPseudoProbe.cpp
The file was modifiedllvm/tools/llvm-profgen/PerfReader.h
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.h
The file was modifiedllvm/tools/llvm-profgen/PerfReader.cpp
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.cpp
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.h
The file was removedllvm/tools/llvm-profgen/PseudoProbe.h
Commit 0a6aad5991ad0230bd435e2ff12f3e4e9614de58 by i
[ELF] Fix typo. NFC
The file was modifiedlld/ELF/Driver.cpp
Commit 9f5d6ea52eb120ba370bf16ee0537602c6fc727e by tianshilei1992
[OpenMP] Fix performance regression reported in bug #51235

This patch fixes the "performance regression" reported in https://bugs.llvm.org/show_bug.cgi?id=51235. In fact it has nothing to do with performance. The root cause is, the stolen task is not allowed to execute by another thread because by default it is tied task. Since hidden helper task will always be executed by hidden helper threads, it should be untied.

Reviewed By: protze.joachim

Differential Revision: https://reviews.llvm.org/D107121
The file was modifiedopenmp/runtime/src/kmp_tasking.cpp
Commit 680c71b127a995389869f51eaef24c7e9d0b2505 by tianshilei1992
[OpenMP] Clean up for hidden helper task

This patch makes some clean up for code of hidden helper task.

Reviewed By: protze.joachim

Differential Revision: https://reviews.llvm.org/D107008
The file was modifiedopenmp/runtime/src/kmp_tasking.cpp
The file was modifiedopenmp/runtime/src/kmp.h
The file was modifiedopenmp/runtime/src/kmp_taskdeps.h
Commit 7a1a35a1d1ae2e69769505c9f39910067c53d53b by andrea.dibiagio
[X86][SchedModel] Add missing ReadAdvance for some arithmetic ops (PR51318 and PR51322).

This fixes a bug where implicit uses of EFLAGS were not marked as ReadAdvance in
the RM/MR variants of ADC/SBB (PR51318)

This also fixes the absence of ReadAdvance for the register operand of
RMW arithmetic instructions (PR51322).

Differential Revision: https://reviews.llvm.org/D107367
The file was modifiedllvm/test/tools/llvm-mca/X86/BtVer2/rmw-add-sequence-readadvance.s
The file was modifiedllvm/lib/Target/X86/X86InstrArithmetic.td
The file was modifiedllvm/test/tools/llvm-mca/X86/BtVer2/adc-sequence-readadvance.s
The file was modifiedllvm/test/tools/llvm-mca/X86/BtVer2/rmw-adc-sequence-readadvance.s
Commit b0d58ddf87b4ddd004f485e2cedc0494df8099e0 by gcmn
[Bazel] Update build for ee7d20e846

Updates the Bazel configuration for
https://github.com/llvm/llvm-project/commit/ee7d20e84675. We need to
drop the dependency from llvm-tblgen to avoid a dependency cycle:

```
.-> @llvm-project//llvm:llvm-tblgen
|   @llvm-project//llvm:tblgen
|   @llvm-project//llvm:MC
|   @llvm-project//llvm:ProfileData
|   @llvm-project//llvm:Core
|   @llvm-project//llvm:attributes_gen
|   @llvm-project//llvm:include/llvm/IR/Attributes.inc
|   @llvm-project//llvm:attributes_gen__gen_attrs_genrule
`-- @llvm-project//llvm:llvm-tblgen
```

It appears this dep was not strictly necessary though. TableGen uses MC
headers but it can get those through Support, which also exports MC
headers due to layering issues.

Differential Revision: https://reviews.llvm.org/D107480
The file was modifiedutils/bazel/llvm-project-overlay/llvm/BUILD.bazel
Commit 6660cec568504df47d9becb0c552c20577880df8 by phosek
[InstrProfiling] Emit bias variable eagerly

Rather than emitting the bias variable lazily as needed, emit it
eagerly. This allows profile runtime to refer to this variable
unconditionally without having to use the weak reference. The bias
variable is in a COMDAT so there'll never be more than one instance,
and if it's not needed, linker should be able to GC it, so the overhead
should be minimal.

Differential Revision: https://reviews.llvm.org/D107377
The file was addedllvm/test/Instrumentation/InstrProfiling/bias-var.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
The file was modifiedllvm/include/llvm/Transforms/Instrumentation/InstrProfiling.h
Commit 7d97de60b3ecd52e2a427dff661cdd1ca99617e9 by Jessica Paquette
[AArch64][GlobalISel] Widen G_FPTO*I before clamping

Going through our legalization rules and doing some cleanup.

Widening and then clamping is usually easier than clamping and then widening.

This allows us to legalize some weird types like s88.

Differential Revision: https://reviews.llvm.org/D107413
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-fptoi.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
Commit d9279843b1bafcfb1f540d3093b86023025b6717 by Jessica Paquette
[AArch64][GlobalISel] Widen G_PHI before clamping it during legalization

This allows us to handle weird types like s88; we first widen to s128, then
clamp back down to s64.

https://godbolt.org/z/9xqbP46Mz

Also this makes it possible for GISel to legalize the case in pr48188.ll. It
now does the same thing as SDAG, although regalloc chooses different registers.

Differential Revision: https://reviews.llvm.org/D107417
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-phi.mir
The file was modifiedllvm/test/CodeGen/AArch64/pr48188.ll
Commit 43a43353f71a609031eab4bb4a8d40bc74dbb753 by i
[gn build] (manually) port ee7d20e84675e1d255d7ae59e3bccfd320cc090d
The file was modifiedllvm/utils/gn/secondary/llvm/lib/MC/BUILD.gn
Commit 6dc4baf7b64b2e34f758a9132948f6409a8280d3 by llvmgnsyncbot
[gn build] Port ee7d20e84675
The file was modifiedllvm/utils/gn/secondary/llvm/tools/llvm-profgen/BUILD.gn
Commit 9cf69ec11d4e86e8c42b0b903d31e1cfa14791e0 by ajcbik
[mlir][sparse] add doc to sparse tensor dialect passes

completes my first pass of filling out missing doc parts on our webpage

Reviewed By: grosul1

Differential Revision: https://reviews.llvm.org/D107479
The file was modifiedmlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.td
Commit 643ce70a6466f043ab41d4044d57b71f80b98874 by craig.topper
[RISCV] Remove the _COMMUTABLE and _TA versions of FMA and wide FMA vector instructions.

Use a tail policy operand instead. Inspired by the work in D105092,
but without the intrinsic interface changes.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D106512
The file was modifiedllvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
The file was modifiedllvm/lib/Target/RISCV/RISCVMCInstLower.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrFormats.td
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
The file was modifiedllvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
Commit 238139be095236ebcd4274b3de5a750262c969c3 by dawid_jurek
[DSE][NFC] Clean up DeadStoreElimination from unused variables

Differential Revision: https://reviews.llvm.org/D106446
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Commit dce35ef104099923e9a9053424c003c28029b9fb by Reshabhkumar.Sharma
Revert "[AMDGPU] Handle functions in llvm's global ctors and dtors list"

This reverts commit d42e70b3d315645e37f3b1455d39e68678e69525.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/llc-pipeline.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPU.h
The file was removedllvm/test/CodeGen/AMDGPU/lower-multiple-ctor-dtor.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
The file was removedllvm/test/CodeGen/AMDGPU/lower-ctor-dtor.ll
The file was removedllvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/CMakeLists.txt
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
The file was modifiedllvm/docs/AMDGPUUsage.rst
The file was removedllvm/test/CodeGen/AMDGPU/hsa-metadata-from-llvm-ctor-dtor-list.ll
Commit 440d9712ebf6d5faa898daa68045ff0c10859db3 by dimitry
Work around non-existence of ElfW(type) macro on FreeBSD

Fixes PR51331. On FreeBSD, the elf headers don't (yet) provide the
ElfW(type) macro. However, there is a similar set of macros in the
<sys/elf-generic.h> header, of which `__ElfN(type)` exactly matches the
indended purpose.

Reviewed By: gulfem

Differential Revision: https://reviews.llvm.org/D107388
The file was modifiedcompiler-rt/lib/profile/InstrProfilingPlatformLinux.c
Commit 0ebb75608759cc1ee1016699e15d03e8e3f30d14 by 31459023+hctim
[hwasan] Add __hwasan_init constructor to runtime lib.

Found by an Android toolchain upgrade, inherited module constructors
(like init_have_lse_atomics from the builtins) can sneak into the hwasan
runtime. If these inherited constructors call hwasanified libc
functions, then the HWASan runtime isn't setup enough, and the code
crashes.

Mark the initialized as a high-priority initializer to fix this.

Reviewed By: pcc, yabinc

Differential Revision: https://reviews.llvm.org/D107391
The file was modifiedcompiler-rt/lib/hwasan/hwasan.cpp
Commit 214f99b27c009c815884d82fded65c4d006b532e by a.bataev
Revert "[SLP]Do not emit extra shuffle for insertelements vectorization."

This reverts commit 871ea69803b1f231254ab0c560795a33b6ed0c77 to fix the
problem if the first vector is not just undef.
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/value-bug-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-fp.ll
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/sitofp-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/load-merge-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/load-merge.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-fp-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/sitofp.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/vectorize-free-extracts-inserts.ll
Commit 14f443030c1acc4346589aee3c1c532dc00eae3a by jan.kratochvil
[nfc] [lldb] Prevent needless copies of DataExtractor

lldb_private::DataExtractor contains DataBufferSP m_data_sp which is
relatively expensive to copy (due to multi-threading locking).

llvm::DataExtractor does not have this problem as it uses StringRef
instead.

The copy constructor is explicit as otherwise it is easy to make
unintended modification of a local copy instead of a caller's instance
(D107470 but that is llvm::DataExtractor).

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D107485
The file was modifiedlldb/include/lldb/DataFormatters/StringPrinter.h
The file was modifiedlldb/source/DataFormatters/StringPrinter.cpp
The file was modifiedlldb/source/Plugins/Process/elf-core/ProcessElfCore.h
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.cpp
The file was modifiedlldb/source/Plugins/Process/elf-core/RegisterUtilities.cpp
The file was modifiedlldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
The file was modifiedlldb/include/lldb/Utility/DataExtractor.h
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
The file was modifiedlldb/unittests/DataFormatter/StringPrinterTests.cpp
Commit 2dad7979909a02d480514f37c9e55f752c0aa0a5 by craig.topper
[RISCV] Add test cases for conditional add/sub. NFC

InstCombine canonicalizes c ? (x+y) : x to (c ? y : 0) + x. It
does the same for and/or/xor. We already reverse this transform
for those, but don't do add/sub yet.
The file was modifiedllvm/test/CodeGen/RISCV/select-binop-identity.ll
Commit c23405174a3f26c044498af411e139e5f104f998 by craig.topper
[DAGCombiner][AMDGPU] Canonicalize constants to the RHS of MULHU/MULHS.

This allows special constants like to 0 to be recognized. It's also
expected by isel patterns if a target had a mulh with immediate instructions.
The commuting done by tablegen won't commute patterns with immediates since it
expects DAGCombine to have done it.

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D107486
The file was modifiedllvm/test/CodeGen/AMDGPU/srem64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sdiv64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/udiv64.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 29a3e3dd7bedb5cfd50277882cfc8d4b6b07ee2f by georgakoudis1
[OpenMPOpt] Expand SPMDization with guarding for target parallel regions

This patch expands SPMDization (converting generic execution mode to SPMD for target regions) by guarding code regions that should be executed only by the main thread. Specifically, it generates guarded regions, which only the main thread executes, and the synchronization with worker threads using simple barriers. For correctness, the patch aborts SPMDization for target regions if the same code executes in a parallel region, thus must be not be guarded. This check is implemented using the ParallelLevels AA.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D106892
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp
The file was modifiedllvm/test/Transforms/OpenMP/replace_globalization.ll
The file was modifiedllvm/test/Transforms/OpenMP/is_spmd_exec_mode_fold.ll
The file was modifiedllvm/test/Transforms/OpenMP/custom_state_machines.ll
The file was modifiedllvm/test/Transforms/OpenMP/get_hardware_num_threads_in_block_fold.ll
The file was modifiedllvm/test/Transforms/OpenMP/spmdization.ll
The file was modifiedllvm/test/Transforms/OpenMP/remove_globalization.ll
Commit 8f465a0cfb7b2596768f749839dd53ab6a5e8dd3 by a.bataev
[SLP][NFC]Add tests for constants/undefs used in insertelements, NFC.
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/sitofp.ll
Commit 41354942c5c3cd4b9ae59179feed701a98791160 by aeubanks
[gn build] Add cfi ignorelist to compiler-rt/lib

So that building the compiler-rt target also copies the cfi ignorelist

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D107411
The file was modifiedllvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
Commit fb27e8c76e04e093dcd378b8a76341a7b6ed3b0c by rdzhabarov
[MLIR][NFC] Get DiagnosticEngine as a reference in doc

'mlir::DiagnosticEngine::DiagnosticEngine(const mlir::DiagnosticEngine&)' is implicitly deleted because the default definition would be ill-formed.

Reviewed By: rdzhabarov

Differential Revision: https://reviews.llvm.org/D107287
The file was modifiedmlir/docs/Diagnostics.md
Commit bb15861e149ac1ce01ed5bd87f760e9469b20a9d by nikita.ppv
[MemCpyOpt] Relax libcall checks

Rather than blocking the whole MemCpyOpt pass if the libcalls are
not available, only disable creation of new memset/memcpy intrinsics
where only load/stores were used previously. This only affects the
store merging and load-store conversion optimization. Other
optimizations are derived from existing intrinsics, which are
well-defined in the absence of libcalls -- not having the libcalls
just means that call simplification won't convert them to intrinsics.

This is a weaker variation of D104801, which dropped these checks
entirely. Ideally we would not couple emission of intrinsics to
libcall availability at all, but as the intrinsics may be legalized
to libcalls we need to be a bit careful right now.

Differential Revision: https://reviews.llvm.org/D106769
The file was addedllvm/test/Transforms/MemCpyOpt/no-libcalls.ll
The file was modifiedllvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
Commit 617be2756fd0e0d943d082e8f86309c4133ce64b by pklausler
[flang] Support DFLOAT legacy extension intrinsic function

Like the similar legacy extension FLOAT(), DFLOAT() represents a
conversion from default integer to DOUBLE PRECISION.  Rewrite
into a conversion operation.

Differential Revision: https://reviews.llvm.org/D107489
The file was modifiedflang/docs/Extensions.md
The file was modifiedflang/lib/Evaluate/intrinsics.cpp
The file was addedflang/test/Semantics/dfloat.f90
Commit 4876520eef34f517075fed9007dc8b3162d67d1a by pklausler
[flang] runtime: For Fw.d formatting, don't oscillate forever

The algorithm for Fw.d output will drive binary to decimal conversion for
an initial fixed number of digits, then adjust that number based on the
result's exposent.  For value close to a power of ten, this adjustment
process wouldn't terminate; e.g., formatting 9.999 as F10.2 would start
with 1e2, boost the digits to 2, get 9.99e1, decrease the digits, and loop.
Solve by refusing to boost the digits a second time.

Differential Revision: https://reviews.llvm.org/D107490
The file was modifiedflang/lib/Decimal/binary-to-decimal.cpp
The file was modifiedflang/unittests/Runtime/NumericalFormatTest.cpp
The file was modifiedflang/runtime/edit-output.cpp
Commit 5edc886e900b12286ad86268461a3013c329118d by michael.hliao
[amdgpu] Add an enhanced conversion from i64 to f32.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D107187
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/cvt_f32_ubyte.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/uint_to_fp.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sint_to_fp.i64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sitofp.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/uint_to_fp.i64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-uitofp.mir
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
Commit a1944386156dbbfae15dfc606a3728e08ac92cfe by i
[CodeGen] Add -align-loops

to `lib/CodeGen/CommandFlags.cpp`. It can replace
-x86-experimental-pref-loop-alignment=.

The loop alignment is only used by MachineBlockPlacement.
The implementation uses a new `llvm::TargetOptions` for now, as
an IR function attribute/module flags metadata may be overkill.

This is the llvm part of D106701.
The file was modifiedllvm/include/llvm/CodeGen/CommandFlags.h
The file was addedllvm/test/CodeGen/RISCV/align-loops.ll
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/lib/CodeGen/TargetLoweringBase.cpp
The file was modifiedllvm/test/CodeGen/X86/innermost-loop-alignment.ll
The file was modifiedllvm/include/llvm/Target/TargetOptions.h
The file was modifiedllvm/lib/CodeGen/CommandFlags.cpp
Commit bd484c994036c682c928b18ff06849d117c9819d by i
[lld] Remove unused LLD_REPOSITORY

Remnant after D72803.

Distributions who want to customize the string can customize
LLD_VERSION_STRING instead.

Reviewed By: #lld-macho, mstorsjo, thakis

Differential Revision: https://reviews.llvm.org/D107416
The file was modifiedlld/Common/Version.cpp
Commit 6ed60fb8a2600e38026b9a9b12fad763cc57c7b2 by michaelrj
[libc] add integration tests for scudo in libc

This change adds tests to make sure that SCUDO is being properly
included with llvm libc. This change also adds the toggles to properly
use SCUDO, as GWP-ASan is enabled by default and must be included for
SCUDO to function.

Reviewed By: sivachandra, hctim

Differential Revision: https://reviews.llvm.org/D106919
The file was addedcompiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
The file was addedlibc/test/integration/scudo/CMakeLists.txt
The file was modifiedcompiler-rt/cmake/config-ix.cmake
The file was modifiedcompiler-rt/CMakeLists.txt
The file was addedlibc/test/integration/scudo/integration_test.cpp
The file was modifiedlibc/test/CMakeLists.txt
The file was addedlibc/test/integration/scudo/gwp_asan_should_crash.cpp
The file was modifiedlibc/lib/CMakeLists.txt
The file was modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt
The file was addedlibc/test/integration/CMakeLists.txt
Commit 0bd297fce2798ce12490a5c67cefbc54061f6bdf by riddleriver
[mlir-lsp-server] Only use one MLIRContext per MLIRTextFile

A text file may be comprised of many different "chunks", when
the input file contains the `// -----` split markers. We don't
need to use a unique MLIRContext per chunk, as having
separate contexts is intended to allow for easy unloading of
unused data and all chunks have the same lifetime (tied to the
input file). This commit uses one context for the entire file,
greatly reducing memory consumption in certain situations (up
to 70%).

Differential Revision: https://reviews.llvm.org/D107488
The file was modifiedmlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp
Commit 981ad13ac65690fc32418af6f09a66b52a604904 by gcmn
[Bazel] Drop deprecated tblgen includes mechanism

Includes can now be fully managed via td_library and specified locally
to the tablegen files that require them. This has been deprecated for a
while and is not used upstream. I'm not aware of any downstream users
either.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D107389
The file was modifiedutils/bazel/llvm-project-overlay/mlir/tblgen.bzl
Commit 9c19b36f1c61fb282c2625c831555fb2f55e3df4 by i
[X86] Remove -x86-experimental-pref-loop-alignment in favor of -align-loops
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 31a71a393f65d9e07b5b0756fef9dd16690950ee by aheejin
[WebAssembly] Make result of 'catch' inst variadic

`catch` instruction can have any number of result values depending on
its tag, but so far we have only needed a single i32 return value for
C++ exception so the instruction was specified that way. But using the
instruction for SjLj handling requires multiple return values.

This makes `catch` instruction's results variadic and moves selection of
`throw` and `catch` instruction from ISelLowering to ISelDAGToDAG.
Moving `catch` to ISelDAGToDAG is necessary because I am not aware of
a good way to do instruction selection for variadic output instructions
in TableGen. This also moves `throw` because 1. `throw` and `catch`
share the same utility function and 2. there is really no reason we
should do that in ISelLowering in the first place. What we do is mostly
the same in both places, and moving them to ISelDAGToDAG allows us to
remove unnecessary mid-level nodes for `throw` and `catch` in
WebAssemblyISD.def and WebAssemblyInstrInfo.td.

This also adds handling for new `catch` instruction to AsmTypeCheck.

Reviewed By: dschuff, tlively

Differential Revision: https://reviews.llvm.org/D107423
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISD.def
The file was modifiedllvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
Commit e1574c51c2655b78606ccffea8db5f63095851bd by i
[llvm-nm][test] Avoid deprecated alias -M (--print-armap)

-M was inappropriately added since -s is taken by Darwin nm.
-M is deprecated. Tests should use --print-armap instead.
The file was modifiedllvm/test/Object/X86/archive-symbol-table.s
The file was modifiedllvm/test/Object/archive-symtab.test
The file was modifiedllvm/test/Object/X86/archive-ir-asm.ll
The file was modifiedllvm/test/Object/archive-long-index.test
The file was modifiedllvm/test/Object/nm-archive.test
The file was modifiedllvm/test/Object/simple-archive.test
Commit 14cb67862a723027c6787baa263f5bf6e03ab01d by airlied
[OpenCL] allow generic address and non-generic defs for CL3.0

This allows both sets of definitions to exist on CL 3.0

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D107318
The file was modifiedclang/lib/Headers/opencl-c.h
Commit 0bd2d4c4b163303ff5211920bdb81328c1ac1f7f by gusss
[mlir][sparse] Remove comment w/ code in it

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D107484
The file was modifiedmlir/test/Integration/data/mttkrp_b.tns
Commit f135a91c72c5744bd40614ee4c0411be68baf16f by michaelrj
[gwpAsan] revert minor change

This change reverts a small cmake change that was causing buildbot
failures.

Differential Revision: https://reviews.llvm.org/D107510
The file was modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt
Commit 7df405e079c5045562c53f7a2504b85f423078be by i
Apply -fmacro-prefix-map to __builtin_FILE()

This matches the behavior of GCC.
Patch does not change remapping logic itself, so adding one simple smoke test should be enough.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D107393
The file was modifiedclang/lib/Basic/LangOptions.cpp
The file was modifiedclang/lib/Lex/PPMacroExpansion.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/include/clang/Basic/LangOptions.h
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedclang/test/CodeGenCXX/builtin-source-location.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/include/clang/Lex/PreprocessorOptions.h
The file was modifiedclang/lib/AST/Expr.cpp
Commit ca2e0536527f0e0dfbab30a90529581e766ba2d9 by Jessica Paquette
[AArch64][GlobalISel] Legalize wide vector G_PHIs

Clamp the max number of elements when legalizing G_PHI. This allows us to
legalize some common fallbacks like 4 x s64.

Here's an example: https://godbolt.org/z/6YocsEYTd

Had to add -global-isel-abort=0 to legalize-phi.mir to account for the
G_EXTRACT_VECTOR_ELT from the 32 x s8 G_PHI.

Differential Revision: https://reviews.llvm.org/D107508
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-phi.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
Commit 50264ff88ab1ed40119f13d482b0cc8326c1e95d by riddleriver
Adding missing filter check to SourceMgrDiagnosticHandler::EmitDiagnostics

There is a case in EmitDiagnostics where the filter check is bypassed (when locationStack is empty).   Filter might also be bypassed when loc instead of showableLoc is added to the locationStack.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D106522
The file was modifiedmlir/lib/IR/Diagnostics.cpp
Commit e52946b9ababcbf8e6f40b1b15900ae2e795a1c6 by yhs
BPF: avoid NE/EQ loop exit condition

Kuniyuki Iwashima reported in [1] that llvm compiler may
convert a loop exit condition with "i < bound" to "i != bound", where
"i" is the loop index variable and "bound" is the upper bound.
In case that "bound" is not a constant, verifier will always have "i != bound"
true, which will cause verifier failure since to verifier this is
an infinite loop.

The fix is to avoid transforming "i < bound" to "i != bound".
In llvm, the transformation is done by IndVarSimplify pass.
The compiler checks loop condition cost (i = i + 1) and if the
cost is lower, it may transform "i < bound" to "i != bound".
This patch implemented getArithmeticInstrCost() in BPF TargetTransformInfo
class to return a higher cost for such an operation, which
will prevent the transformation for the test case
added in this patch.

[1] https://lore.kernel.org/netdev/1994df05-8f01-371f-3c3b-d33d7836878c@fb.com/

Differential Revision: https://reviews.llvm.org/D107483
The file was addedllvm/test/CodeGen/BPF/loop-exit-cond.ll
The file was modifiedllvm/lib/Target/BPF/BPFTargetTransformInfo.h
Commit 041b5251415d9c96c9535e6e780770ad066883fe by modimo
[CSSPGO] Remove used of PseudoProbeAttributes::Reserved

D106861 added usage of PseudoProbeAttributes::Reserved as TailCall however this usage hasn't been committed/reviewed. Removing this usage.

Testing
ninja check-all

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D107514
The file was modifiedllvm/include/llvm/MC/MCPseudoProbe.h
The file was modifiedllvm/lib/MC/MCPseudoProbe.cpp
Commit 597e407cf23b92db202732e6890561b2f2830a58 by kcc
[libFuzzer] tests/examples for using libFuzzer for out-of-process targets

[libFuzzer] tests/examples for using libFuzzer for out-of-process targets

Reviewed By: kostik

Differential Revision: https://reviews.llvm.org/D107498
The file was addedcompiler-rt/test/fuzzer/OutOfProcessFuzzTarget.cpp
The file was addedcompiler-rt/test/fuzzer/SanCovDump.cpp
The file was addedcompiler-rt/test/fuzzer/out-of-process-fuzz.test
Commit 693a95a69416e23a31e46d3d2c81e854688e606e by gcmn
[Bazel] Add support for lld

This patch adds a Bazel configuration to build lld. That includes a
BUILD.bazel file to export the libunwind headers for use by lld. Since
the lld target itself requires libxml2 (through WindowsManifest) it's
currently disabled on Buildkite and marked manual, but all the libraries
build.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D107414
The file was addedutils/bazel/llvm-project-overlay/libunwind/BUILD.bazel
The file was addedutils/bazel/llvm-project-overlay/lld/BUILD.bazel
Commit 7a6482216ff02f81ed02ff4936f1b22d4b5a9a6c by i
[CMake][gn] lldMachO=>lldMachOOld, lldMachO2=>lldMachO

Now that D95204 switched default to new Darwin backend, rename some CMake
targets to match.

Reviewed By: #lld-macho, smeenai, int3

Differential Revision: https://reviews.llvm.org/D107516
The file was modifiedlld/unittests/DriverTests/CMakeLists.txt
The file was modifiedlld/tools/lld/CMakeLists.txt
The file was modifiedllvm/utils/gn/secondary/lld/unittests/MachOTests/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/lld/tools/lld/BUILD.gn
The file was modifiedlld/lib/Driver/CMakeLists.txt
The file was modifiedllvm/utils/gn/secondary/lld/lib/ReaderWriter/MachO/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/lld/unittests/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/lld/lib/Driver/BUILD.gn
The file was modifiedlld/MachO/CMakeLists.txt
The file was modifiedlld/unittests/MachOTests/CMakeLists.txt
The file was modifiedllvm/utils/gn/secondary/lld/MachO/BUILD.gn
The file was modifiedlld/lib/ReaderWriter/MachO/CMakeLists.txt
The file was modifiedllvm/utils/gn/secondary/lld/unittests/DriverTests/BUILD.gn
Commit ac7c7cbfdaf9d8fd7335fe2622fa825eed7535a2 by springerm
[mlir] Update comment in Region.h

The file in which `Region::viewGraph` is defined has changed. This should have been updated with D106342.

Differential Revision: https://reviews.llvm.org/D107517
The file was modifiedmlir/include/mlir/IR/Region.h
Commit 75abeb64cebd5a79e837e9ea54f19d0b2125cb28 by powerman1st
[AVR] emit 'MCSA_Global' references to '__do_global_ctors' and '__do_global_dtors'

Emit references to '__do_global_ctors' and '__do_global_dtors' to allow
constructor/destructor routines to run.

Reviewed by: MaskRay

Differential Revision: https://reviews.llvm.org/D107133
The file was addedllvm/test/CodeGen/AVR/ctors.ll
The file was modifiedllvm/lib/Target/AVR/AVRAsmPrinter.cpp
The file was modifiedllvm/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.cpp
The file was modifiedllvm/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.h
Commit fb0a929512c25bd9859498cde7d1c6c73f550d61 by Dan Liew
[Compiler-RT] On Apple Platforms switch to always emitting full debug info

Previously the build used `-gline-tables-only` when `COMPILER_RT_DEBUG`
was off (default) and `-g` when `COMPILER_RT_DEBUG` was on. The end
result of this meant that the release build of the Sanitizer runtimes
were difficult to debug (e.g. information about variables and function
arguments were missing).

Presumably the reason for preferring `-gline-tables-only` for release
builds was to save space. However, for Apple platforms this doesn't
matter because debug info lives in separate `.dSYM` files (which aren't
shipped) rather than in the shipped `.dylib` files.

Now on Apple platforms we always emit full debug info if the compiler
supports it and we emit a fatal error if `-g` isn't supported.

rdar://79223184

Differential Revision: https://reviews.llvm.org/D107501
The file was modifiedcompiler-rt/CMakeLists.txt
Commit 58481663692b55ca03f8b41ccb660dcbcebffc49 by nathan
Disable LibFuncs for stpcpy and stpncpy for Android < 21

These functions don't exist in android API levels < 21. A change in
llvm-12 (rG6dbf0cfcf789) caused Oz builds to emit this symbol assuming
it's available and thus is causing link errors. Simply disable it here.

Differential Revision: https://reviews.llvm.org/D107509
The file was modifiedllvm/lib/Analysis/TargetLibraryInfo.cpp
The file was modifiedllvm/test/Transforms/InstCombine/sprintf-1.ll
Commit 12b34e056cf19d9c2c2a7f180ba26991bba3f16c by springerm
[mlir] Clean up includes in Transforms/Passes.h

Differential Revision: https://reviews.llvm.org/D107520
The file was modifiedmlir/lib/Transforms/NormalizeMemRefs.cpp
Commit aa0b0fbbe6f80cce720c72240b870b74bf5b1e6f by aheejin
[WebAssembly] Use `SDValue::getConstantOperandVal` (NFC)

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D107499
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
Commit 9c3345ad1020bbd8ec61a07339c1d1e804ef3011 by aheejin
[WebAssembly] Cleanup Emscripten SjLj tests

- Remove a redundant test: there were `longjmp_only` and `only_longjmp`,
  which do the same thing
- Add `CHECK-LABEL` lines for function names

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D107511
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
Commit 26aa1bbe97a3a1566633abbcf754046a6bffb155 by eopxd
[NFCI] [LoopIdiom] Let processLoopStridedStore take StoreSize as SCEV instead of unsigned

Letting it take SCEV allows further modification on the function to optimize
if the StoreSize / Stride is runtime determined.

This is a preceeding of D107353.
The big picture is to let LoopIdiom deal with runtime-determined sizes.

Reviewed By: Whitney, lebedev.ri

Differential Revision: https://reviews.llvm.org/D104595
The file was modifiedllvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
Commit a533eb7423acad49f10426cd78dc8e7e66a6365f by i
Revert "[ELF] Apply version script patterns to non-default version symbols"

This reverts commit 7ed22a6fa90cbdc70d6806c1121a0c50c1978dce.

buf is not cleared so the commit misses some cases.
The file was modifiedlld/ELF/Driver.cpp
The file was modifiedlld/test/ELF/version-script-noundef.s
The file was addedlld/test/ELF/version-script-extern.s
The file was modifiedlld/ELF/Config.h
The file was modifiedlld/ELF/Symbols.cpp
The file was modifiedlld/test/ELF/version-script-symver.s
The file was removedlld/test/ELF/version-script-symver-extern.s
The file was modifiedlld/ELF/ScriptParser.cpp
The file was modifiedlld/ELF/SymbolTable.cpp
The file was addedlld/test/ELF/version-script-extern-exact.s
The file was modifiedlld/ELF/SymbolTable.h
The file was addedlld/test/ELF/version-script-extern-wildcards.s
Commit 00809c8889ed34a5fe014167aa473216dcb63a47 by i
[ELF] Apply version script patterns to non-default version symbols

Currently version script patterns are ignored for .symver produced
non-default version (single @) symbols. This makes such symbols
not localizable by `local:`, e.g.

```
.symver foo3_v1,foo3@v1
.globl foo_v1
foo3_v1:

ld.lld --version-script=a.ver -shared a.o
```

This patch adds the support:

* Move `config->versionDefinitions[VER_NDX_LOCAL].patterns` to `config->versionDefinitions[versionId].localPatterns`
* Rename `config->versionDefinitions[versionId].patterns` to `config->versionDefinitions[versionId].nonLocalPatterns`
* Allow `findAllByVersion` to find non-default version symbols when `includeNonDefault` is true. (Note: `symtab` keys do not have `@@`)
* Make each pattern check both the unversioned `pat.name` and the versioned `${pat.name}@${v.name}`
* `localPatterns` can localize `${pat.name}@${v.name}`. `nonLocalPatterns` can prevent localization by assigning `verdefIndex` (before `parseSymbolVersion`).

---

If a user notices new `undefined symbol` errors with a version script containing
`local: *;`, the issue is likely due to a missing `global:` pattern.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D107234
The file was modifiedlld/test/ELF/version-script-noundef.s
The file was removedlld/test/ELF/version-script-extern-wildcards.s
The file was removedlld/test/ELF/version-script-extern-exact.s
The file was modifiedlld/ELF/SymbolTable.h
The file was modifiedlld/test/ELF/verdef-defaultver.s
The file was modifiedlld/ELF/ScriptParser.cpp
The file was removedlld/test/ELF/version-script-extern.s
The file was modifiedlld/ELF/Config.h
The file was modifiedlld/ELF/SymbolTable.cpp
The file was modifiedlld/ELF/Symbols.cpp
The file was modifiedlld/test/ELF/version-script-symver.s
The file was modifiedlld/ELF/Driver.cpp
The file was addedlld/test/ELF/version-script-symver-extern.s
Commit ddbe812bccba947c95027c4af7aebf79e7274b83 by ikudrin
[ARM][llvm-objdump] Annotate PC-relative memory operands

This implements `MCInstrAnalysis::evaluateMemoryOperandAddress()` for
Arm so that the disassembler can print the target address of memory
operands that use PC+immediate addressing.

Differential Revision: https://reviews.llvm.org/D105979
The file was modifiedllvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
The file was modifiedllvm/lib/Target/ARM/ARMInstrInfo.td
The file was addedllvm/test/tools/llvm-objdump/ELF/ARM/literal-thumb2.s
The file was modifiedllvm/lib/Target/ARM/ARMInstrThumb.td
The file was addedllvm/test/tools/llvm-objdump/ELF/ARM/literal-arm.s
The file was modifiedllvm/lib/Target/ARM/ARMInstrFormats.td
The file was addedllvm/test/tools/llvm-objdump/ELF/ARM/literal-thumb.s
The file was modifiedllvm/lib/Target/ARM/ARMInstrThumb2.td
Commit 2c14798ead0dbffca58eb64f5672d40fe59bb040 by ikudrin
[ARM][llvm-objdump] Annotate PC-relative memory operands of VLDR instructions

This extends D105979 and adds support for VLDR instructions.

Differential Revision: https://reviews.llvm.org/D105980
The file was modifiedllvm/include/llvm/MC/MCInstrAnalysis.h
The file was addedllvm/test/tools/llvm-objdump/ELF/ARM/literal-vldr-thumb2.s
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
The file was modifiedllvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
The file was modifiedllvm/lib/Target/ARM/ARMInstrInfo.td
The file was modifiedllvm/tools/llvm-objdump/llvm-objdump.cpp
The file was addedllvm/test/tools/llvm-objdump/ELF/ARM/literal-vldr-arm.s
The file was modifiedllvm/lib/MC/MCInstrAnalysis.cpp
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
Commit 39fa96a4906934774ba20bcb0cd5f808f619f3a6 by mgorny
[llvm] [lit] Fix inconsistent test order in shtest-keyword-parse-errors

Remove test times when running shtest-keyword-parse-errors test,
in order to prevent the previous executions from impacting subtest
order and therefore causing FileCheck to fail.

Differential Revision: https://reviews.llvm.org/D107427
The file was modifiedllvm/utils/lit/tests/shtest-keyword-parse-errors.py
Commit 46020f6f0c8aa134002208b2ecf0593b04c46d08 by martin
[llvm-rc] Allow specifying language with a leading 0x prefix

This option is always interpreted strictly as a hexadecimal string,
even if it has no prefix that indicates the number format, hence
the existing call to StringRef::getAsInteger(16, ...).

StringRef::getAsInteger(0, ...) consumes a leading "0x" prefix is
present, but when the radix is specified, the radix shouldn't
be included.

Both MS rc.exe and GNU windres accept the language with that
prefix.

Also allow specifying the codepage to llvm-windres with a different
radix, as GNU windres allows that (but MS rc.exe doesn't).

This fixes https://llvm.org/PR51295.

Differential Revision: https://reviews.llvm.org/D107263
The file was modifiedllvm/test/tools/llvm-rc/language.test
The file was modifiedllvm/test/tools/llvm-rc/codepage.test
The file was modifiedllvm/tools/llvm-rc/llvm-rc.cpp
Commit 7529f0e3e1427fea93a6a66a2aed5394710e5fb5 by nealsid
D106035: Remove conditional compilation for WCHAR support in libedit

This change moves to using narrow character types and libedit APIs in
Editline, because those are the same types that the rest of LLVM/LLDB
uses, and it's generally considered better practice to use UTF-8
encoded in char than it is to use wider characters. However, for
character input, the change leaves in using a wchar to enable input of
multi-byte characters.

Differential Revision: https://reviews.llvm.org/D106035
The file was modifiedlldb/source/Host/common/Editline.cpp
The file was modifiedlldb/cmake/modules/LLDBConfig.cmake
The file was modifiedlldb/include/lldb/Host/Editline.h
Commit 39dac1f7f65691487dbdc969e343108db5b0f765 by Anshil.Gandhi
[clang] Add clang builtins support for gfx90a

Implement target builtins for gfx90a including fadd64, fadd32, add2h,
max and min on various global, flat and ds address spaces for which
intrinsics are implemented.

Differential Revision: https://reviews.llvm.org/D106909
The file was addedclang/test/CodeGenOpenCL/builtins-amdgcn-fp-atomics-gfx908-err.cl
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was addedclang/test/CodeGenOpenCL/builtins-fp-atomics-gfx1030.cl
The file was addedclang/test/CodeGenOpenCL/builtins-fp-atomics-gfx90a.cl
The file was addedclang/test/CodeGenOpenCL/builtins-amdgcn-fp-atomics-gfx7-err.cl
The file was modifiedclang/include/clang/Basic/BuiltinsAMDGPU.def
The file was addedclang/test/CodeGenOpenCL/builtins-fp-atomics-gfx8.cl
Commit e790b2b7443adb601ce54a63e64fdfc670c8df45 by jay.foad
[AMDGPU] Make more use of getHiHalf64 and split64BitValue. NFCI.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
Commit 13c8ec44e6385127f4aaba333dcad705dd5888c6 by Lang Hames
[llvm-jitlink] Don't try to guess the ORC runtime path.

ORC-runtime regression tests will now explicitly specify the runtime path.
The file was modifiedcompiler-rt/test/orc/lit.cfg.py
The file was modifiedllvm/tools/llvm-jitlink/llvm-jitlink.cpp
Commit 0b8471e91bb62f1174a46607e6533fcea2ac12c6 by fraser
[SelectionDAG] Correctly determine the VECREDUCE_SEQ_FMUL action

The LegalizeAction for this node should follow the logic for
`VECREDUCE_SEQ_FADD` and be determined using the vector operand's type.

here isn't an in-tree target that makes use of this, but I think it's safe to
say this is how it should behave, should a target want to customize the action
for this node.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D107478
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit e345b45bf1b5db03f00c3b3612d2653790a2b879 by oliver.stannard
Mark tests as requiring AMDGPU target
The file was modifiedclang/test/CodeGenOpenCL/builtins-fp-atomics-gfx8.cl
The file was modifiedclang/test/CodeGenOpenCL/builtins-fp-atomics-gfx90a.cl
Commit 9bd78932c7afe227542d674746bb00a363846b3d by jay.foad
[AMDGPU] Generate checks for ctlz_zero_undef/cttz_zero_undef
The file was modifiedllvm/test/CodeGen/AMDGPU/ctlz_zero_undef.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/cttz_zero_undef.ll
Commit 55fd6f292fac7294fcd302e79065eb4fd7a89dfc by nealsid
Revert "D106035: Remove conditional compilation for WCHAR support in libedit"

This reverts commit 7529f0e3e1427fea93a6a66a2aed5394710e5fb5.
The file was modifiedlldb/include/lldb/Host/Editline.h
The file was modifiedlldb/source/Host/common/Editline.cpp
The file was modifiedlldb/cmake/modules/LLDBConfig.cmake
Commit 92b00ffe0fb3199515c9267a1fad96d3bf44d1ea by sven.vanhaastregt
[OpenCL] Reduce duplicate defs by using multiclasses; NFC

Builtin definitions with pointer arguments were duplicated to provide
overloads differing in the pointer argument's address space.

Reduce this duplication by capturing the definitions in multiclasses.
This still results in the same number of builtins in the generated
tables, but the description is more concise now.

Differential Revision: https://reviews.llvm.org/D107151
The file was modifiedclang/lib/Sema/OpenCLBuiltins.td
Commit 55a96155995465416118774add8ef09c30dbebda by andrzej.warzynski
[flang][driver] Refactor boolean options

For boolean options, e.g. `-fxor-operator`/`-fno-xor-operator`, we ought
to be using TableGen multi-classes. This way, we only have to write one
definition to have both forms auto-generated. This patch refactors all
of Flang's boolean options to use two new multi-classes:
`OptInFC1FFOption` and `OptOutFC1FFOption`. These multi-classes are
based on `OptInFFOption`/`OptOutFFOption`, respectively. I've also
simplified the processing of the updated options in
CompilerInvocation.cpp.

With the new approach, "empty" help text (i.e. no `HelpText`) is now
replaced with an empty string (i.e. HelpText<"">). When running
flang-new --help, that's considered as non-empty help messages, which is
then printed (that's controlled by `printHelp` from
llvm/lib/Option/OptTable.cpp). This means that with this patch,
flang-new --help will start printing e.g. -fno-backslash, even though
there is no actual help text to print for this option (apart from the
empty string ""). Tests are updated accordingly.

Note that with this patch, both `-fxor-operator` and `-fno-xor-operator`
(and other boolean options refactored here) remain available in
`flang-new` and `flang-new -fc1`. In this respect, nothing changes. In a
forthcoming patch, I will refine this so that `flang-new -fc1` only
accepts `-ffoo` (`OptInFC1FFOption`) or `-fno-foo` (`OptOutCC1FFOption`).

For clarity, `OptInFFOption`/`OptOutFFOption` are renamed as
`OptInCC1FFOption`/`OptOutCC1FFOption`, respectively. Otherwise, this is
an NFC from Clang's perspective.

Differential Revision: https://reviews.llvm.org/D105881
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedflang/test/Driver/driver-help-hidden.f90
The file was modifiedflang/test/Driver/driver-help.f90
The file was modifiedflang/lib/Frontend/CompilerInvocation.cpp
Commit 530ea28fefc4652823a187a149e8001cbf4af18f by aaron
Correct a lot of diagnostic wordings for the driver

Clang diagnostics should not start with a capital letter or use
trailing punctuation (https://clang.llvm.org/docs/InternalsManual.html#the-format-string),
but quite a few driver diagnostics were not following this advice. This
corrects the grammar and punctuation to improve consistency, but does
not change the circumstances under which the diagnostics are produced.
The file was modifiedclang/test/Frontend/invalid-cxx-abi.cpp
The file was modifiedclang/test/Driver/cuda-options.cu
The file was modifiedclang/test/Driver/rocm-detect.hip
The file was modifiedclang/test/Driver/fuse-ld.c
The file was modifiedclang/test/Frontend/round-trip-cc1-args.c
The file was modifiedclang/test/Driver/defsym.s
The file was modifiedclang/test/Driver/aarch64-outliner.c
The file was modifiedclang/test/Driver/hip-invalid-target-id.hip
The file was modifiedclang/test/OpenMP/target_messages.cpp
The file was modifiedclang/test/Driver/hip-inputs.hip
The file was modifiedclang/test/Driver/cl-inputs.c
The file was modifiedclang/test/Driver/amdgpu-invalid-target-id.s
The file was modifiedclang/test/Driver/cuda-options-freebsd.cu
The file was modifiedclang/test/Driver/msp430-hwmult.c
The file was modifiedclang/test/Driver/rocm-detect.cl
The file was modifiedclang/test/Driver/cuda-bad-arch.cu
The file was modifiedclang/test/Driver/cuda-version-check.cu
The file was modifiedclang/include/clang/Basic/DiagnosticDriverKinds.td
The file was modifiedclang/test/Driver/aix-object-mode.c
The file was modifiedclang/test/Driver/cuda-detect.cu
The file was modifiedclang/test/Driver/arm-thumb-only-cores.c
The file was modifiedclang/test/Driver/clang_f_opts.c
The file was modifiedclang/test/Driver/cuda-omp-unsupported-debug-options.cu
The file was modifiedclang/test/Driver/openmp-offload.c
The file was modifiedclang/test/Driver/rocm-not-found.cl
The file was modifiedclang/test/Driver/cl-options.c
The file was modifiedclang/test/Driver/openmp-offload-gpu.c
The file was modifiedclang/test/Driver/amdgpu-openmp-system-arch-fail.c
The file was modifiedclang/lib/Driver/ToolChains/Cuda.cpp
The file was modifiedclang/test/Driver/invalid-target-id.cl
Commit c7a4ede3511692a58627a9eedb8518dcef6c9a97 by dvyukov
tsan: make IsMetaMem accept u32*

MemToMeta returns u32*, so it's reasonable for IsMetaMem
to accept u32* as well.
Changing the argument type just removes few type casts.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D107481
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_debugging.cpp
Commit a82c7476a76a8305905a6423d337ea5bbd66c837 by dvyukov
tsan: introduce RawShadow type

Currently we hardcode u64 type for shadow everywhere
and do lots of uptr<->u64* casts. It makes it hard to
change u64 to another type (e.g. u32) and makes it easy
to introduce bugs.
Introduce RawShadow type and use it in MemToShadow, ShadowToMem,
IsShadowMem and throughout the code base as u64 replacement.
This makes it possible to change u64 to something else in future
and generally improves static typing.

Depends on D107481.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D107482
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interface_java.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_debugging.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.h
The file was modifiedcompiler-rt/lib/tsan/tests/unit/tsan_shadow_test.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_defs.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
Commit cc947e29ea0afa6efa506ffbf74115879be64c6d by dominik.montada
[GlobalISel] Combine shr(shl x, c1), c2 to G_SBFX/G_UBFX

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D107330
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/test/CodeGen/AArch64/arm64-rev.ll
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/form-bitfield-extract-from-shr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ubfe.ll
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Commit e78bf49a58ed0beca9fa594bddd61a0655fcedb0 by llvm-dev
[X86] Rename Subtarget Tuning Feature Flag Prefix. NFC.

As suggested on D107370, this patch renames the tuning feature flags to start with 'Tuning' instead of 'Feature'.

Differential Revision: https://reviews.llvm.org/D107459
The file was modifiedllvm/lib/Target/X86/X86.td
The file was modifiedllvm/lib/Target/X86/X86MCInstLower.cpp
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.h
Commit 7217b01481566092c440f249d65a10efee8c50ad by jay.foad
[AMDGPU] Add globalisel checks for ctlz_zero_undef/cttz_zero_undef
The file was modifiedllvm/test/CodeGen/AMDGPU/cttz_zero_undef.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ctlz_zero_undef.ll
Commit 7b73ca3043fecfc5fa6bbf5b28edfee61a83ff9f by andrzej.warzynski
[flang][driver] Delete `f18` (i.e. the old Flang driver)

This patch removes `f18`, a.k.a. the old driver. It is being replaced
with the new driver, `flang-new`, which has reached feature parity with
`f18` a while ago. This was discussed in [1] and also in [2].

With this change, `FLANG_BUILD_NEW_DRIVER` is no longer needed and is
also deleted. This means that we are making the dependency on Clang permanent
(i.e. it cannot be disabled with a CMake flag).

LIT set-up is updated accordingly. All references to `f18` or `f18.cpp`
are either updated or removed.

The `F18_FC` variable from the `flang` bash script is replaced with
`FLANG_FC`. The former is still supported for backwards compatibility.

[1] https://lists.llvm.org/pipermail/flang-dev/2021-June/000742.html
[2] https://reviews.llvm.org/D103177

Differential Revision: https://reviews.llvm.org/D105811
The file was modifiedflang/include/flang/Frontend/FrontendOptions.h
The file was modifiedllvm/CMakeLists.txt
The file was modifiedflang/tools/f18/CMakeLists.txt
The file was modifiedflang/CMakeLists.txt
The file was removedflang/test/Driver/help-f18.f90
The file was modifiedflang/unittests/CMakeLists.txt
The file was modifiedflang/docs/ImplementingASemanticCheck.md
The file was modifiedflang/include/flang/Frontend/CompilerInvocation.h
The file was removedflang/tools/f18/flang.in
The file was addedflang/tools/f18/flang
The file was modifiedflang/tools/CMakeLists.txt
The file was removedflang/tools/f18/f18.cpp
The file was modifiedflang/test/CMakeLists.txt
The file was modifiedflang/lib/CMakeLists.txt
The file was modifiedflang/test/lit.cfg.py
The file was modifiedflang/test/lit.site.cfg.py.in
The file was modifiedflang/docs/Overview.md
The file was modifiedflang/lib/Frontend/CompilerInvocation.cpp
Commit 66de26b1f9ecf22193aea2edfac03db03f138feb by petar.avramovic
GlobalISel: Fix matchEqualDefs for instructions with multiple defs

Instructions that produceSameValue produce same values for operands with
same index. matchEqualDefs used to return true for any two values from
different instructions that produce same values. Fix this by checking if
values are defined by operands with the same index.

Differential Revision: https://reviews.llvm.org/D107362
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/postlegalizercombiner-select.mir
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Commit 8d2a8ced00dc45605cb856845385d289e8cc45ed by flo
[VectorCombine] Add additional tests with freeze combinations.

Suggested in D107364.
The file was modifiedllvm/test/Transforms/VectorCombine/load-insert-store.ll
Commit 75aa3d520d53fb0d2a279736245ad255ec720a5b by paul.robinson
Add a DIExpression const-folder to prevent silly expressions.

It's entirely possible (because it actually happened) for a bool
variable to end up with a 256-bit DW_AT_const_value.  This came about
when a local bool variable was initialized from a bitfield in a
32-byte struct of bitfields, and after inlining and constant
propagation, the variable did have a constant value. The sequence of
optimizations had it carrying "i256" values around, but once the
constant made it into the llvm.dbg.value, no further IR changes could
affect it.

Technically the llvm.dbg.value did have a DIExpression to reduce it
back down to 8 bits, but the compiler is in no way ready to emit an
oversized constant *and* a DWARF expression to manipulate it.
Depending on the circumstances, we had either just the very fat bool
value, or an expression with no starting value.

The sequence of optimizations that led to this state did seem pretty
reasonable, so the solution I came up with was to invent a DWARF
constant expression folder.  Currently it only does convert ops, but
there's no reason it couldn't do other ops if that became useful.

This broke three tests that depended on having convert ops survive
into the DWARF, so I added an operator that would abort the folder to
each of those tests.

Differential Revision: https://reviews.llvm.org/D106915
The file was modifiedllvm/unittests/IR/MetadataTest.cpp
The file was addedllvm/test/DebugInfo/X86/DIExpr-const-folding.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/FastISel.cpp
The file was modifiedllvm/lib/IR/DebugInfoMetadata.cpp
The file was modifiedllvm/test/DebugInfo/X86/convert-debugloc.ll
The file was modifiedllvm/test/DebugInfo/X86/convert-linked.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
The file was modifiedllvm/test/DebugInfo/X86/convert-loclist.ll
The file was modifiedllvm/include/llvm/IR/DebugInfoMetadata.h
Commit 21bf8172dbbc0b542e236c04e0065132106e9048 by david.sherwood
[NFC] Remove redundant test in Transforms/LoopVectorize/lifetime.ll

The two tests (@testloopvariant and @testbitcast) are actually
identical as in both loops the bitcast gets widened, forcing the
lifetime marker to be replicated using each lane of the input
vector.

Differential Revision: https://reviews.llvm.org/D107150
The file was modifiedllvm/test/Transforms/LoopVectorize/lifetime.ll
Commit 8d08a847457444679b40da5094f19149a9672b42 by sander.desmalen
[LV] Remove a change that was added in D106164.

This change wasn't strictly necessary for D106164 and could be removed.
This patch addresses the post-commit comments from @fhahn on D106164, and
also changes sve-widen-gep.ll to use the same IR test as shown in
pointer-induction.ll.

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D106878
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/AArch64/sve-widen-gep.ll
Commit 0e08891ec1a63850c99cfe270ae5370150a12d29 by bmahjour
[DA] control compile-time spent by MIV tests

Function exploreDirections() in DependenceAnalysis implements a recursive
algorithm for refining direction vectors. This algorithm has worst-case
complexity of O(3^(n+1)) where n is the number of common loop levels.
In this patch I'm adding a threshold to control the amount of time we
spend in doing MIV tests (which most of the time end up resulting in over
pessimistic direction vectors anyway).

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D107159
The file was addedllvm/test/Analysis/DependenceAnalysis/MIVMaxLevelThreshold.ll
The file was modifiedllvm/lib/Analysis/DependenceAnalysis.cpp
Commit 5181be344adbf7ba7dffc73526893d4e7750d34c by sd.fertile
[PowerPC][AIX] Limit attribute aligned to 4096.

Limit the maximum alignment for attribute aligned to 4096 to match
the limit of the .align pseudo op in the system assembler.

Differential Revision: https://reviews.llvm.org/D107497
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was addedclang/test/Sema/aix-attr-aligned-limit.c
Commit 1172a8a7639399fe0b8a6c78a7123b1c3f9cf833 by david.sherwood
[NFC] Clean up tests in test/Transforms/LoopVectorize/assume.ll

The tests previously had lots of unnecessary CHECK lines, where
all we really need to check is the presence (or absence) of the
assume intrinsic and the correct input operands.

Differential Revision: https://reviews.llvm.org/D107157
The file was modifiedllvm/test/Transforms/LoopVectorize/assume.ll
Commit d0c3b61498ecc04c9d95f6af7eb7560727500d56 by kparzysz
Delay initialization of OptBisect

When LLVM is used in other projects, it may happen that global cons-
tructors will execute before the call to ParseCommandLineOptions.
Since OptBisect is initialized via a constructor, and has no ability
to be updated at a later time, passing "-opt-bisect-limit" to the
parse function may have no effect.

To avoid this problem use a cl::cb (callback) to set the bisection
limit when the option is actually processed.

Differential Revision: https://reviews.llvm.org/D104551
The file was modifiedllvm/include/llvm/IR/OptBisect.h
The file was modifiedllvm/lib/IR/OptBisect.cpp
Commit f8cdde71950760675f81fa89fcd603b4391908a4 by dawid_jurek
[SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation

FoldMallocMemset can be safely removed because since https://reviews.llvm.org/D103009
such transformation is already performed in DSE.

Differential Revision: https://reviews.llvm.org/D103451
The file was modifiedllvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
The file was modifiedllvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/memset-1.ll
Commit 91e399519580930623e1eb7be43374f0ba8aba41 by fanbo.meng
Revert "[SystemZ][z/OS] Update target specific __attribute__((aligned)) value for test"

This reverts commit d91234b21c1a1a34d98157089a8769d8f9a32f06.

Reviewed By: abhina.sreeskantharajan

Differential Revision: https://reviews.llvm.org/D107565
The file was modifiedclang/test/Sema/struct-packed-align.c
Commit 95800da914938129083df2fa0165c1901909c273 by david.sherwood
[LoopVectorize] Add support for replication of more intrinsics with scalable vectors

This patch adds more instructions to the Uniforms list, for example certain
intrinsics that are uniform by definition or whose operands are loop invariant.
This list includes:

  1. The intrinsics 'experimental.noalias.scope.decl' and 'sideeffect', which
  are always uniform by definition.
  2. If intrinsics 'lifetime.start', 'lifetime.end' and 'assume' have
  loop invariant input operands then these are also uniform too.

Also, in VPRecipeBuilder::handleReplication we check if an instruction is
uniform based purely on whether or not the instruction lives in the Uniforms
list. However, there are certain cases where calls to some intrinsics can
be effectively treated as uniform too. Therefore, we now also treat the
following cases as uniform for scalable vectors:

  1. If the 'assume' intrinsic's operand is not loop invariant, then we
  are free to treat this as uniform anyway since it's only a performance
  hint. We will get the benefit for the first lane.
  2. When the input pointers for 'lifetime.start' and 'lifetime.end' are loop
  variant then for scalable vectors we assume these still ultimately come
  from the broadcast of an alloca. We do not support scalable vectorisation
  of loops containing alloca instructions, hence the alloca itself would
  be invariant. If the pointer does not come from an alloca then the
  intrinsic itself has no effect.

I have updated the assume test for fixed width, since we now treat it
as uniform:

  Transforms/LoopVectorize/assume.ll

I've also added new scalable vectorisation tests for other intriniscs:

  Transforms/LoopVectorize/scalable-assume.ll
  Transforms/LoopVectorize/scalable-lifetime.ll
  Transforms/LoopVectorize/scalable-noalias-scope-decl.ll

Differential Revision: https://reviews.llvm.org/D107284
The file was addedllvm/test/Transforms/LoopVectorize/scalable-noalias-scope-decl.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/assume.ll
The file was addedllvm/test/Transforms/LoopVectorize/scalable-assume.ll
The file was addedllvm/test/Transforms/LoopVectorize/scalable-lifetime.ll
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Commit 06206a8cd1b1538e265f79e245c34180c640e334 by dawid_jurek
[BuildLibCalls][NFC] Remove redundant attribute list from emitCalloc

Additionally with this patch aligned DSE which is the only user of emitCalloc.

Differential Revision: https://reviews.llvm.org/D103523
The file was modifiedllvm/include/llvm/Transforms/Utils/BuildLibCalls.h
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was modifiedllvm/lib/Transforms/Utils/BuildLibCalls.cpp
Commit 38b098be6605494cc7308ea9b08f920c4c3fe4ce by flo
[VectorCombine] Limit scalarization known non-poison indices.

We can only trust the range of the index if it is guaranteed
non-poison.

Fixes PR50949.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D107364
The file was modifiedllvm/test/Transforms/VectorCombine/load-insert-store.ll
The file was modifiedllvm/lib/Transforms/Vectorize/VectorCombine.cpp
Commit 2cbf9fd402afe8c33272bf60997cfb7e1f7c5f69 by llvm-dev
[DAG] DAGCombiner::visitVECTOR_SHUFFLE - recognise INSERT_SUBVECTOR patterns

IR typically creates INSERT_SUBVECTOR patterns as a widening of the subvector with undefs to pad to the destination size, followed by a shuffle for the actual insertion - SelectionDAGBuilder has to do something similar for shuffles when source/destination vectors are different sizes.

This combine attempts to recognize these patterns by looking for a shuffle of a subvector (from a CONCAT_VECTORS) that starts at a modulo of its size into an otherwise identity shuffle of the base vector.

This uncovered a couple of target-specific issues as we haven't often created INSERT_SUBVECTOR nodes in generic code - aarch64 could only handle insertions into the bottom of undefs (i.e. a vector widening), and x86-avx512 vXi1 insertion wasn't keeping track of undef elements in the base vector.

Fixes PR50053

Differential Revision: https://reviews.llvm.org/D107068
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-512-v16.ll
The file was modifiedllvm/test/CodeGen/X86/avx-intrinsics-x86-upgrade.ll
The file was modifiedllvm/test/CodeGen/X86/avx-vperm2x128.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/arm64-neon-copy.ll
The file was modifiedllvm/test/CodeGen/X86/2012-04-26-sdglue.ll
The file was modifiedllvm/test/CodeGen/X86/pr34592.ll
Commit d99e9461b07988914cba573800cd1862f277e155 by mgorny
[clang] [clang-repl] Fix linking against LLVMLineEditor

LLVMLineEditor library is part of the LLVM dylib.  Move it into
LLVM_LINK_COMPONENTS to avoid duplicate linking when dylib is being
used.  This fixes building standalone clang against installed LLVM
without static libraries.

Differential Revision: https://reviews.llvm.org/D107558
The file was modifiedclang/tools/clang-repl/CMakeLists.txt
Commit 15eb431537dc88d1e4fe4d276ecaa453647b9802 by dvyukov
tsan: modernize MaybeReportThreadLeak

Use C++ casts and auto.
Rename to CollectThreadLeaks b/c it's only collecting, not reporting.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D107568
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
Commit fc545c52cdfe1593967598ac9c3645095d5405c6 by dvyukov
tsan: handle bugs in symbolizer more gracefully

For symbolizer we only process SIGSEGV signals synchronously
(which means bug in symbolizer or in tsan).
But we still want to reset in_symbolizer to fail gracefully.
Symbolizer and user code use different memory allocators,
so if we don't reset in_symbolizer we can get memory allocated
with one being feed with another, which can cause more crashes.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D107564
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
Commit f171149e0d541ca7da7af5fe59bd6d9a77267d24 by momchil.velikov
[SimpifyCFG] Speculate a store preceded by a local non-escaping load

In SimplifyCFG we may simplify the CFG by speculatively executing
certain stores, when they are preceded by a store to the same
location.  This patch allows such speculation also when the stores are
similarly preceded by a load.

In order for this transformation to be correct we need to ensure that
the memory location is writable and the store in the new location does
not introduce a data race.

Local objects (created by an `alloca` instruction) are always
writable, so once we are past a read from a location it is valid to
also write to that same location.

Seeing just a load does not guarantee absence of a data race (unlike
if we see a store) - the load may still be part of a race, just not
causing undefined behaviour
(cf. https://llvm.org/docs/Atomics.html#optimization-outside-atomic).

In the original program, a data race might have been prevented by the
condition, but once we move the store outside the condition, we must
be sure a data race wasn't possible anyway, no matter what the
condition evaluates to.

One way to be sure that a local object is never concurrently
read/written is check that its address never escapes the function.

Hence this transformation is restricted to local, non-escaping
objects.

Reviewed By: nikic, lebedev.ri

Differential Revision: https://reviews.llvm.org/D107281
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/speculate-store.ll
Commit cb7b0a5f34e54db8e3f56eabd9f477ab02b95f98 by dvyukov
tsan: don't include tsan_interceptors.h for Go

None of the interceptors machinery is used/enabled for Go,
so don't include the header, it's not needed (must not be).
The problem is that we have fields in ThreadState that are
not present in the Go build, so changes in thread_interceptors.h
can cause Go build breakages due to missing fields.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D107561
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_external.cpp
Commit c6a485caf69326d2fd3300a4f8944889bdd189cd by dvyukov
tsan: qualify autos

clang-tidy warning requires qualifying auto pointers:

clang-tidy: warning: 'auto ctx' can be declared as 'auto *ctx' [llvm-qualified-auto]

Fix remaing cases we have in tsan.

Depends on D107561.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D107562
The file was modifiedcompiler-rt/lib/tsan/go/tsan_go.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.cpp
Commit 35816163f26b14122895ce0d0ea3b44e9d23ff3f by dvyukov
tsan: pass thr/pc to MemoryResetRange

Pass thr/pc args to MemoryResetRange as we do everywhere.
Currently they are unused by MemoryResetRange,
but there is no reason to be inconsistent.

Depends on D107562.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D107563
The file was modifiedcompiler-rt/lib/tsan/go/tsan_go.cpp
Commit e6c364a62456409f22470e163ffd7f68772d4198 by jay.foad
[AMDGPU][SDag] Better lowering for 64-bit ctlz/cttz

Differential Revision: https://reviews.llvm.org/D107546
The file was modifiedllvm/test/CodeGen/AMDGPU/cttz_zero_undef.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ctlz.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/cttz.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/urem64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/srem64.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/sdiv64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/udiv64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ctlz_zero_undef.ll
Commit 2b63933115f75f4b06c317a77fdef0e4e5656976 by jay.foad
[AMDGPU][SDag] Better lowering for 32-bit ctlz/cttz

Differential Revision: https://reviews.llvm.org/D107566
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/ctlz.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/uint_to_fp.i64.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/cttz.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/cttz_zero_undef.ll
Commit fd7f6a3c812a5aebefb93370ec130e725d80238e by eopxd
[NFC][LoopIdiom] rename boolean variable NegStride to IsNegStride

Rename variable for better code readability.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D107570
The file was modifiedllvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
Commit f888e442bcc547301b58e77667eb261c0391b897 by sd.fertile
[PowerPC][AIX] attribute aligned cannot decrease align of a vector var.

On AIX an aligned attribute cannot decrease the alignment of a variable
when placed on a variable declaration of vector type.

Differential Revision: https://reviews.llvm.org/D107522
The file was addedclang/test/CodeGen/aix-vector-attr-aligned.c
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was addedclang/test/Sema/aix-attr-aligned-vector-warn.c
Commit 3e47f009ff2c28c2a24150b1da46b61afa847a44 by sander.desmalen
[LV] Consider ExtractValue as uniform.

Since all operands to ExtractValue must be loop-invariant when we deem
the loop vectorizable, we can consider ExtractValue to be uniform.

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D107286
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was addedllvm/test/Transforms/LoopVectorize/AArch64/sve-widen-extractvalue.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/AArch64/extractvalue-no-scalarization-required.ll
Commit e9177b09585a8be62fb9d9d28f063323c5e36760 by david.sherwood
Fix build issues caused by 95800da914938129083df2fa0165c1901909c273
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Commit f7076cfd3ad39ac71314c2deb5c5517c7c6bfd61 by craig.topper
[DAGCombiner][RISCV][AMDGPU] Call SimplifyDemandedBits at the end of visitMULHU to enable known bits contant folding.

We don't have real demanded bits support for MULHU, but we can
still use the known bits based constant folding support at the end
of SimplifyDemandedBits to simplify a MULHU. This helps with cases
where we know the LHS and RHS have enough leading zeros so that
the high multiply result is always 0.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D106471
The file was modifiedllvm/test/CodeGen/AMDGPU/srem64.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/stepvector.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/rvv-vscale.i64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sdiv64.ll
Commit e7c3eaa8aeba497bcd61adeeaafce5b99ff756a8 by a.bataev
[SLP]Do not emit extra shuffle for insertelements vectorization.

If the vectorized insertelements instructions form indentity subvector
(the subvector at the beginning of the long vector), it is just enough
to extend the vector itself, no need to generate inserting subvector
shuffle.

Differential Revision: https://reviews.llvm.org/D107494
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/load-merge-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/load-merge.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/vectorize-free-extracts-inserts.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-fp.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/sitofp.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/value-bug-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-fp-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/sitofp-inseltpoison.ll
Commit 72661f337ae03f5cb2988717bc1486cd9bc4baef by kazu
[Transforms] Drop unnecessary const from return types (NFC)

Identified with readability-const-return-type.
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
The file was modifiedllvm/lib/Transforms/Scalar/SROA.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.h
Commit 6b0f35931a44b0fbd27297f83087d3a4c352e83f by jennifer.yu
Fix signal during the call to checkOpenMPLoop.

The root problem is a null pointer is accessed during the call to
checkOpenMPLoop, because loop up bound expr is an error expression
due to error diagnostic was emit early.

To fix this, in setLCDeclAndLB, setUB and setStep instead return false,
return true when LB, UB or Step contains Error, so that the checking is
stopped in checkOpenMPLoop.

Differential Revision: https://reviews.llvm.org/D107385
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_loop_messages.cpp
Commit 97469d4c20615e7e7986a23d6c42a59f011590a3 by flo
[SLP] Add additional memory version tests.
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/memory-runtime-checks.ll
Commit 180f4a87c5cfa0133ec4d4554350e38e672a145c by kubak
Add llvm-stress binary to Bazel build configuration.

The `llvm-stress` binary is currently missing from the Bazel `BUILD` file for llvm. This patch adds it.

Reviewed By: GMNGeoffrey

Differential Revision: https://reviews.llvm.org/D107571
The file was modifiedutils/bazel/llvm-project-overlay/llvm/BUILD.bazel
Commit f3f3098afe1ca21671922e39328f127e79b7dd3c by Jessica Paquette
[AArch64][GlobalISel] Mark v16s8 <- v8s8, v8s8 G_CONCAT_VECTOR as legal

G_CONCAT_VECTORS shows up from time to time when legalizing other instructions.

We actually import patterns for the v16s8 <- v8s8, v8s8 case so marking it
as legal gives us selection for free.

Differential Revision: https://reviews.llvm.org/D107512
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-concat-vectors.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-concat-vectors.mir
Commit bd17ced1db9a674fc8aa6632899e245672c7aa35 by benny.kra
Revert "[X86] combineX86ShuffleChain(): canonicalize mask elts picking from splats"

This reverts commits f819e4c7d0f6efef3cc1042cc45582320bf6c0a2 and
35c0848b570214ed2b2d96cca4dd62bb7ae725cd. It triggers an infinite loop during
compilation.

$ cat t.ll
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

define void @MaxPoolGradGrad_1.65() local_unnamed_addr #0 {
entry:
  %wide.vec78 = load <64 x i32>, <64 x i32>* null, align 16
  %strided.vec83 = shufflevector <64 x i32> %wide.vec78, <64 x i32> poison, <8 x i32> <i32 4, i32 12, i32 20, i32 28, i32 36, i32 44, i32 52, i32 60>
  %0 = lshr <8 x i32> %strided.vec83, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
  %1 = add <8 x i32> zeroinitializer, %0
  %2 = shufflevector <8 x i32> %1, <8 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
  %3 = shufflevector <16 x i32> %2, <16 x i32> undef, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
  %interleaved.vec = shufflevector <32 x i32> undef, <32 x i32> %3, <64 x i32> <i32 0, i32 8, i32 16, i32 24, i32 32, i32 40, i32 48, i32 56, i32 1, i32 9, i32 17, i32 25, i32 33, i32 41, i32 49, i32 57, i32 2, i32 10, i32 18, i32 26, i32 34, i32 42, i32 50, i32 58, i32 3, i32 11, i32 19, i32 27, i32 35, i32 43, i32 51, i32 59, i32 4, i32 12, i32 20, i32 28, i32 36, i32 44, i32 52, i32 60, i32 5, i32 13, i32 21, i32 29, i32 37, i32 45, i32 53, i32 61, i32 6, i32 14, i32 22, i32 30, i32 38, i32 46, i32 54, i32 62, i32 7, i32 15, i32 23, i32 31, i32 39, i32 47, i32 55, i32 63>
  store <64 x i32> %interleaved.vec, <64 x i32>* undef, align 16
  unreachable
}

$ llc < t.ll -mcpu=skylake
<hang>
The file was modifiedllvm/test/CodeGen/X86/avx512-shuffles/partial_permute.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-256-v32.ll
The file was modifiedllvm/test/CodeGen/X86/avx.ll
The file was modifiedllvm/test/CodeGen/X86/pr15296.ll
The file was modifiedllvm/test/CodeGen/X86/sse41.ll
Commit b4c0307d598004cfd96c770d2a4a84a37c838ba9 by Jon Roelofs
Fix clang-interpreter build after 2487db1f286222e2501c2fa8e8244eda13f6afc3
The file was modifiedclang/examples/clang-interpreter/main.cpp
Commit 976bd2361237f2fafc736d26dc78d1b95cd80d94 by hoy
[llvm-ar] Fix for handling thin archive with SYM64 and a test case for it

WHen thin archives are created which have symbol table of type SYM64 then all the tools will not work since they cannot read the files properly.
One can reproduce the problem as follows:
1. Take a hello world program and create an archive out of it. The SYM64_THRESHOLD=0 will force the generation of SYM64 symbol table.
    clang -c hello.cpp
    SYM64_THRESHOLD=0 llvm-ar crsT mylib.a hello.o
2. Now try to use any of the tools on this mylib.a and it will fail.
    llvm-nm -M mylib.a

THis fix will eliminate these failures. A regression test is created in llvm/test/Object/archive-symtab.test

Reviewed By: MaskRay, Ramesh

Differential Revision: https://reviews.llvm.org/D107322
The file was modifiedllvm/test/Object/archive-symtab.test
The file was modifiedllvm/lib/Object/Archive.cpp
Commit a756239e727842f2c274208acd8fb93fa745d04a by Dan Liew
Fix COMPILER_RT_DEBUG build for targets that don't support thread local storage.

022439931f5be77efaf80b44d587666b0c9b13b5 added code that is only enabled
when COMPILER_RT_DEBUG is enabled. This code doesn't build on targets
that don't support thread local storage because the code added uses the
THREADLOCAL macro. Consequently the COMPILER_RT_DEBUG build broke for
some Apple targets (e.g. 32-bit iOS simulators).

```
/Volumes/user_data/dev/llvm/llvm.org/main/src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mutex.cpp:216:8: error: thread-local storage is not supported for the current target
static THREADLOCAL InternalDeadlockDetector deadlock_detector;
       ^
/Volumes/user_data/dev/llvm/llvm.org/main/src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:227:24: note: expanded from macro 'THREADLOCAL'
# define THREADLOCAL   __thread
                        ^
1 error generated.
```

To fix this, this patch introduces a `SANITIZER_SUPPORTS_THREADLOCAL`
macro that is `1` iff thread local storage is supported by the current
target. That condition is then added to `SANITIZER_CHECK_DEADLOCKS` to
ensure the code is only enabled when thread local storage is available.

The implementation of `SANITIZER_SUPPORTS_THREADLOCAL` currently assumes
Clang. See `llvm-project/clang/include/clang/Basic/Features.def` for the
definition of the `tls` feature.

rdar://81543007

Differential Revision: https://reviews.llvm.org/D107524
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_mutex.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform.h
Commit c020be17ce0a43c32554585e1075627769f364f3 by Jonas Devlieghere
[lldb] Use a struct to pass function search options to Module::FindFunction

Rather than passing two booleans around, which is especially error prone
with them being next to each other, use a struct with named fields
instead.

Differential revision: https://reviews.llvm.org/D107295
The file was modifiedlldb/source/Commands/CommandObjectSource.cpp
The file was modifiedlldb/source/Core/Module.cpp
The file was modifiedlldb/source/Expression/IRExecutionUnit.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
The file was modifiedlldb/source/API/SBModule.cpp
The file was modifiedlldb/source/Commands/CommandObjectDisassemble.cpp
The file was modifiedlldb/source/Core/ModuleList.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
The file was modifiedlldb/source/Commands/CommandCompletions.cpp
The file was modifiedlldb/source/Commands/CommandObjectTarget.cpp
The file was modifiedlldb/include/lldb/Core/ModuleList.h
The file was modifiedlldb/source/Core/SourceManager.cpp
The file was modifiedlldb/source/API/SBTarget.cpp
The file was modifiedlldb/source/Breakpoint/BreakpointResolverName.cpp
The file was modifiedlldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
The file was modifiedlldb/include/lldb/Core/Module.h
Commit a46bcc60e52fe080ee87af1788e8cdc00f9c035f by Jonas Devlieghere
[lldb] Refactor IRExecutionUnit::FindInSymbols (NFC)

This patch refactors IRExecutionUnit::FindInSymbols. It eliminates a few
potential pitfalls and tries to be more explicit about the state carried
between symbol resolution attempts.

Differential revision: https://reviews.llvm.org/D107206
The file was modifiedlldb/source/Expression/IRExecutionUnit.cpp
Commit 72d070b4db2da7216f63f09407bd96f49dc90bd1 by i
[ELF] Support copy relocation on non-default version symbols

Copy relocation on a non-default version symbol is unsupported and can crash at
runtime. Fortunately there is a one-line fix which works for most cases:
ensure `getSymbolsAt` unconditionally returns `ss`.

If two non-default version symbols are defined at the same place and both
are copy relocated, our implementation will copy relocated them into different
addresses. The pointer inequality is very unlikely an issue. In GNU ld, copy
relocating version aliases seems to create more pointer inequality problems than
us.

(
In glibc, sys_errlist@GLIBC_2.2.5 sys_errlist@GLIBC_2.3 sys_errlist@GLIBC_2.4
are defined at the same place, but it is unlikely they are all copy relocated in
one executable. Even if so, the variables are read-only and pointer inequality
should not be a problem.
)

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D107535
The file was modifiedlld/ELF/Relocations.cpp
The file was modifiedlld/test/ELF/Inputs/copy-rel-version.s
The file was modifiedlld/test/ELF/copy-rel-version.s
Commit 9854f2f30f84123ca78aa3603102e7cef4ec33c8 by isanbard
[llvm-diff] Create libLLVMDiff library

Some tools may want to use the LLVM "diff" code. Move the code into a
library for easy use.

No functionality change intende.

Differential Revision: https://reviews.llvm.org/D107392
The file was addedllvm/tools/llvm-diff/lib/DiffLog.h
The file was addedllvm/tools/llvm-livepatch/CMakeLists.txt
The file was addedllvm/tools/llvm-diff/lib/DiffConsumer.h
The file was addedllvm/tools/llvm-diff/lib/DiffLog.cpp
The file was removedllvm/tools/llvm-diff/DiffLog.h
The file was removedllvm/tools/llvm-diff/DifferenceEngine.h
The file was addedllvm/tools/llvm-diff/lib/DiffConsumer.cpp
The file was addedllvm/tools/llvm-diff/lib/CMakeLists.txt
The file was addedllvm/tools/llvm-diff/lib/DifferenceEngine.h
The file was removedllvm/tools/llvm-diff/DifferenceEngine.cpp
The file was removedllvm/tools/llvm-diff/DiffConsumer.h
The file was addedllvm/tools/llvm-diff/lib/DifferenceEngine.cpp
The file was modifiedllvm/tools/llvm-diff/CMakeLists.txt
The file was removedllvm/tools/llvm-diff/DiffConsumer.cpp
The file was removedllvm/tools/llvm-diff/DiffLog.cpp
The file was modifiedllvm/tools/llvm-diff/llvm-diff.cpp
Commit 16605aea844060c2973df079c9f91650132c099d by lebedev.ri
[NFC][Codegen][X86] Add testcase that hanged after D107009

From Benjamin Kramer @ https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20210802/945642.html
The file was modifiedllvm/test/CodeGen/X86/oddshuffles.ll
Commit c0586ff05dd08e4cbfc6fb7881274d8d89913463 by lebedev.ri
[NFC][X86] combineX86ShuffleChain(): hoist Mask variable higher up

Having `NewMask` outside of an if and rebinding `BaseMask` `ArrayRef`
to it is confusing. Instead, just move the `Mask` vector higher up,
and change the code that earlier had no access to it but now does
to use `Mask` instead of `BaseMask`.

This has no other intentional changes.

This is a recommit of 35c0848b570214ed2b2d96cca4dd62bb7ae725cd,
that was reverted to simplify reversion of an earlier change.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 509854b69cea0c9261ac21ceb22012a53e7a800b by jonathanchesterfield
[clang] Replace asm with __asm__ in cuda header

Asm is a gnu extension for C, so at present -fopenmp -std=c99
and similar fail to compile on nvptx, bug 51344

Changing to `__asm__` or `__asm` works for openmp, all three appear to work
for cuda. Suggesting `__asm__` here as `__asm` is used by MSVC with different
syntax, so this should make for better error diagnostics if the header is
passed to a compiler other than clang.

Reviewed By: tra, emankov

Differential Revision: https://reviews.llvm.org/D107492
The file was modifiedclang/lib/Headers/__clang_cuda_device_functions.h
Commit fec8f1a008c311d96689dbe7876b23ecc82d00d5 by isanbard
Remove unintended commit.
The file was removedllvm/tools/llvm-livepatch/CMakeLists.txt
Commit a9628e96ca5b3d264d88147494c82cb63e8ac973 by hedingarcia
[libc] Add diff and perf targets for more math functions

Comparing the run time of math functions from LLVM libc
with the MSVCRT libc:
|function |perf-LLVM libc     |perf-MSVCRT
|ceilf |2.36 mins (141491389600 ns)|47.10 sec (47100940100 ns)
|exp2f             |6.37 mins (358441794700 ns)|12.39 mins (719404388300 ns)
|expf |6.35 mins (381204661800 ns)|6.17 mins (346150163200 ns)
|fabsf |1.18 mins (78425546600 ns) |53.75 sec (53745301900 ns)
|floorf |3.15 mins (164770963800 ns)|45.94 sec (45935988400 ns)
|logbf |4.38 mins (262508058800 ns)|55.47 sec (55466377700 ns)
|nearbyintf |3.20 mins (167972868000 ns)|9.13 mins (523822963600 ns)
|rintf |3.20 mins (168001498700 ns)|22.35 mins (1341266448800 ns)
|roundf |2.35 mins (141151500600 ns)|1.42 mins (85326429800 ns)
|truncf |2.31 mins (114846424000 ns)|59.41 sec (59414309100 ns)

Evaluating the number of differing results in Windows:
|function |diff
|ceilf          |8388606 differing results
|exp2f         |213303887 differing results
|expf           |193922 differing results
|fabsf          |8388606 differing results
|floorf         |8388606 differing results
|logbf          |0 differing results
|nearbyintf     |0 differing results
|rintf          |0 differing results
|roundf         |0 differing results
|truncf |0 differing results

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D107462
The file was addedlibc/test/src/math/differential_testing/ceilf_perf.cpp
The file was addedlibc/test/src/math/differential_testing/truncf_perf.cpp
The file was addedlibc/test/src/math/differential_testing/expf_perf.cpp
The file was modifiedlibc/test/src/math/differential_testing/CMakeLists.txt
The file was addedlibc/test/src/math/differential_testing/floorf_perf.cpp
The file was addedlibc/test/src/math/differential_testing/nearbyintf_diff.cpp
The file was addedlibc/test/src/math/differential_testing/exp2f_perf.cpp
The file was addedlibc/test/src/math/differential_testing/rintf_perf.cpp
The file was addedlibc/test/src/math/differential_testing/roundf_diff.cpp
The file was addedlibc/test/src/math/differential_testing/ceilf_diff.cpp
The file was addedlibc/test/src/math/differential_testing/logbf_perf.cpp
The file was addedlibc/test/src/math/differential_testing/fabsf_perf.cpp
The file was addedlibc/test/src/math/differential_testing/roundf_perf.cpp
The file was addedlibc/test/src/math/differential_testing/floorf_diff.cpp
The file was modifiedlibc/test/src/math/differential_testing/sqrtf_perf.cpp
The file was addedlibc/test/src/math/differential_testing/logbf_diff.cpp
The file was addedlibc/test/src/math/differential_testing/expf_diff.cpp
The file was addedlibc/test/src/math/differential_testing/nearbyintf_perf.cpp
The file was addedlibc/test/src/math/differential_testing/fabsf_diff.cpp
The file was addedlibc/test/src/math/differential_testing/rintf_diff.cpp
The file was addedlibc/test/src/math/differential_testing/truncf_diff.cpp
The file was addedlibc/test/src/math/differential_testing/exp2f_diff.cpp
The file was modifiedlibc/test/src/math/differential_testing/sqrtf_diff.cpp
Commit f8b6e1faa913748695fa920a6d4d91f780c291f8 by gcmn
[Bazel] Update for 9854f2f30f (Diff library)

Updates the Bazel build for
https://github.com/llvm/llvm-project/commit/9854f2f30f by extracting a
library from llvm-diff. Note that this does not include the new
llvm-livepatch binary, for which the CMake file was added accidentally
and reverted in https://github.com/llvm/llvm-project/commit/fec8f1a008.

Differential Revision: https://reviews.llvm.org/D107586
The file was modifiedutils/bazel/llvm-project-overlay/llvm/BUILD.bazel
Commit b260f3fdda63bbddb7834c42cfeeb2b0a8b86a23 by dimitry
sanitizer_common: disable thread safety annotations for googletest

Recently in 0da172b1766e thread safety warnings-as-errors were enabled.
However, googletest is currently not compatible with thread safety
annotations. On FreeBSD, which has the pthread functions marked with
such annotations, this results in errors when building the compiler-rt
tests:

    In file included from compiler-rt/lib/interception/tests/interception_test_main.cpp:15:
    In file included from llvm/utils/unittest/googletest/include/gtest/gtest.h:62:
    In file included from llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h:40:
    llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h:1636:3: error: mutex 'mutex_' is still held at the end of function [-Werror,-Wthread-safety-analysis]
      }
      ^
    llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h:1633:32: note: mutex acquired here
        GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
                                   ^
    llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h:1645:32: error: releasing mutex 'mutex_' that was not held [-Werror,-Wthread-safety-analysis]
        GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));
                                   ^
    2 errors generated.

At some point googletest will hopefully be made compatible with thread
safety annotations, but for now add corresponding `-Wno-thread-*` flags
to `COMPILER_RT_GTEST_CFLAGS` to silence these warnings-as-errors.

Reviewed By: dvyukov

Differential Revision: https://reviews.llvm.org/D107491
The file was modifiedcompiler-rt/CMakeLists.txt
Commit ec5137029bf267bf3b6a52f035cf02ddc1932539 by mascasa
Revert "[llvm-diff] Create libLLVMDiff library"

This reverts commit 9854f2f30f84123ca78aa3603102e7cef4ec33c8 since it
broke all the builds.
The file was addedllvm/tools/llvm-diff/DifferenceEngine.cpp
The file was removedllvm/tools/llvm-diff/lib/DiffConsumer.h
The file was addedllvm/tools/llvm-diff/DiffConsumer.cpp
The file was removedllvm/tools/llvm-diff/lib/CMakeLists.txt
The file was addedllvm/tools/llvm-diff/DiffLog.cpp
The file was modifiedllvm/tools/llvm-diff/llvm-diff.cpp
The file was removedllvm/tools/llvm-diff/lib/DiffLog.cpp
The file was modifiedllvm/tools/llvm-diff/CMakeLists.txt
The file was removedllvm/tools/llvm-diff/lib/DiffConsumer.cpp
The file was removedllvm/tools/llvm-diff/lib/DiffLog.h
The file was removedllvm/tools/llvm-diff/lib/DifferenceEngine.cpp
The file was addedllvm/tools/llvm-diff/DiffLog.h
The file was addedllvm/tools/llvm-diff/DifferenceEngine.h
The file was removedllvm/tools/llvm-diff/lib/DifferenceEngine.h
The file was addedllvm/tools/llvm-diff/DiffConsumer.h
Commit 113a06f7a50010b555a0fdabc9db0a8338e2f2a8 by chris.jackson
{DebugInfo][LSR] Don't cache dbg.value that are already undef

The SCEV-based salvaging method caches dbg.value information pre-LSR so
that salvaging may be attempted post-LSR. If the dbg.value are already
undef pre-LSR then a salvage attempt would be fruitless, so avoid
caching them.

Reviewed By: StephenTozer

Differential Revision: https://reviews.llvm.org/D107448
The file was modifiedllvm/test/Transforms/LoopStrengthReduce/pr51329.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Commit 892990c56cc05188ad38c29c0acb283dcdf05b1e by arthur.j.odwyer
[libc++] IWYU to fix complaints when compiling with Modules. NFCI.

Differential Revision: https://reviews.llvm.org/D107583
The file was modifiedlibcxx/include/__iterator/counted_iterator.h
The file was modifiedlibcxx/include/__ranges/single_view.h
The file was modifiedlibcxx/include/__iterator/iter_swap.h
The file was modifiedlibcxx/include/__ranges/access.h
The file was modifiedlibcxx/include/__ranges/ref_view.h
The file was modifiedlibcxx/include/__ranges/common_view.h
The file was modifiedlibcxx/include/__ranges/take_view.h
The file was modifiedlibcxx/include/__ranges/transform_view.h
The file was modifiedlibcxx/include/__ranges/subrange.h