SuccessChanges

Summary

  1. [NFC][InstCombine] Negator: include all the needed headers, IWYU (details)
  2. [LoopVectorizer] Inloop vector reductions (details)
  3. [ASan][Darwin] Adapt test for macOS 11+ version scheme (details)
  4. [lldb/test] Replace LLDB_TEST_SRC env variable with configuration (details)
  5. [TFUtils] Expose untyped accessor to evaluation result tensors (details)
  6. Revert "[LoopVectorizer] Inloop vector reductions" (details)
  7. [X86][SSE] Fold 128-bit PACK(EXTEND(X),EXTEND(Y)) -> CONCAT(X,Y) subvectors (details)
  8. [msan] Remove readnone and friends from call sites. (details)
  9. [LIBOMPTARGET]Fix order of mapper data for targetDataEnd function. (details)
  10. Fix _ExtInt(1) to be a i1 in memory. (details)
  11. [clangd] Hide "swap if branch" tweak (details)
  12. Remove Olesen from LLVM code owners (details)
  13. [MLIR][LinAlg] Use AnyTypeOf for LinalgOperand for better error msg. (details)
  14. [libFuzzer] Do not link pthreads on Android. (details)
  15. [mlir][nfc] Rename `promoteMemRefDescriptors` to `promoteOperands`. (details)
  16. [flang][NFC] Unify OpenMP and OpenACC structure checker (details)
  17. [clang-format] fix BreakBeforeBraces.MultiLine with for each macros (details)
  18. [InstSimplify] add vector tests for icmp with mul nuw; NFC (details)
  19. [InstSimplify] fold icmp with mul nuw and constant operands (details)
  20. [lldb/test] Use realpath consistently for test root file paths. (details)
  21. [InstSimplify] fold icmp with mul nsw and constant operands (details)
  22. AMDGPU: Fix verifier error with undef source producing s_bitset* (details)
  23. AMDGPU: Remove leftover test (details)
  24. [spirv] Fix bitwidth emulation for Workgroup storage class (details)
  25. AMDGPU: Refactor buffer atomic intrinsic lowering (details)
  26. [NFC][InstCombine] Add tests for negation of old-style [n]abs, select-of-op-vs-negation-of-op (details)
  27. [InstCombine] Negator: -(cond ? x : -x)  -->  cond ? -x : x (details)
  28. [mlir][StandardToSPIRV] Use spv.UMod for index re-calculation (details)
  29. [clangd] Disable define out-of-line code action on templates (details)
  30. Revert "Add libFuzzer shared object build output" (details)
  31. [clangd][NFC] Delete dead code in ExtractFunction code action (details)
  32. AMDGPU: Eliminate BUFFER_ATOMIC_PK_ADD_F16 node (details)
  33. [Driver] Accept -fno-lto in clang-cl (details)
  34. [NewPM][LoopRotate] Rename rotate -> loop-rotate (details)
  35. [AMDGPU] gfx1031 target (details)
  36. [AMDGPU] Added missing gfx1031 cases to CGOpenMPRuntimeGPU.cpp (details)
  37. AMDGPU: Correct prolog SP initialization logic (details)
  38. [CUDA] Work around a bug in rint/nearbyint caused by a broken implementation provided by CUDA. (details)
  39. [lldb/test] Support git commit version ids for clang. (details)
  40. [Propeller]: Use a descriptive temporary symbol name for the end of the basic block. (details)
  41. [AMDGPU] Scavenge temp reg for AGPR spill (details)
  42. [libomptarget][NFC] Replace `%ld` with PRId64 for data of type int64_t. (details)
  43. [libc] Add strspn implementation and std::bitset (details)
  44. [OpenMP] Fix `present` diagnostic for array extension (details)
  45. [OpenMP] Fix `target data` exit for array extension (details)
  46. [WebAssembly] Fix types in wasm_simd128.h and add tests (details)
  47. [InstCombine] add tests for icmp with mul nsw/nuw; NFC (details)
  48. [InstCombine] fold icmp with 'mul nsw/nuw' and constant operands (details)
  49. CFG: Destroy temporaries in (a,b) expression in the correct order. (details)
  50. [lldb] Modify the `skipIfRemote` decorator so we can skip all PExpect tests. (details)
  51. [lldb] Skip TestProcessConnect when running remotely (details)
  52. Add verification for DW_AT_decl_file and DW_AT_call_file. (details)
  53. [mlir] use the new stateful LLVM type translator by default (details)
  54. [lldb] Skip test_launch_simple on Windows (details)
  55. [X86] Add test case for PR47000. NFC (details)
  56. [X86] Disable copy elision in LowerMemArgument for scalarized vectors when the loc VT is a different size than the original element. (details)
Commit a05ec856a3e79c03fa2657b05b440401bf4af1a3 by lebedev.ri
[NFC][InstCombine] Negator: include all the needed headers, IWYU
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineNegator.cpp
Commit e9761688e41cb979a1fa6a79eb18145a75104933 by david.green
[LoopVectorizer] Inloop vector reductions

Arm MVE has multiple instructions such as VMLAVA.s8, which (in this
case) can take two 128bit vectors, sign extend the inputs to i32,
multiplying them together and sum the result into a 32bit general
purpose register. So taking 16 i8's as inputs, they can multiply and
accumulate the result into a single i32 without any rounding/truncating
along the way. There are also reduction instructions for plain integer
add and min/max, and operations that sum into a pair of 32bit registers
together treated as a 64bit integer (even though MVE does not have a
plain 64bit addition instruction). So giving the vectorizer the ability
to use these instructions both enables us to vectorize at higher
bitwidths, and to vectorize things we previously could not.

In order to do that we need a way to represent that the reduction
operation, specified with a llvm.experimental.vector.reduce when
vectorizing for Arm, occurs inside the loop not after it like most
reductions. This patch attempts to do that, teaching the vectorizer
about in-loop reductions. It does this through a vplan recipe
representing the reductions that the original chain of reduction
operations is replaced by. Cost modelling is currently just done through
a prefersInloopReduction TTI hook (which follows in a later patch).

Differential Revision: https://reviews.llvm.org/D75069
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.h
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
The file was modifiedllvm/lib/Analysis/IVDescriptors.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/reduction-inloop-uf4.ll
The file was modifiedllvm/include/llvm/Analysis/IVDescriptors.h
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/reduction-inloop.ll
Commit 1e90bd7f84d3948807c8f40926e72def664f07fa by julian.lettner
[ASan][Darwin] Adapt test for macOS 11+ version scheme

This test depends on the versioning scheme of OSX.
The file was modifiedcompiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cpp
Commit f425c0442c3ef137f2c4ab5eebd3d39036b09d70 by rupprecht
[lldb/test] Replace LLDB_TEST_SRC env variable with configuration

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D85322
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
The file was modifiedlldb/packages/Python/lldbsuite/test/plugins/builder_base.py
The file was modifiedlldb/packages/Python/lldbsuite/test/configuration.py
The file was modifiedlldb/packages/Python/lldbsuite/test/dotest.py
Commit b18c41c66fd16bde1a0a80a94f03815bc58dcc5a by mtrofin
[TFUtils] Expose untyped accessor to evaluation result tensors

These were implementation detail, but become necessary for generic data
copying.

Also added const variations to them, and move assignment, since we had a
move ctor (and the move assignment helps in a subsequent patch).

Differential Revision: https://reviews.llvm.org/D85262
The file was modifiedllvm/unittests/Analysis/TFUtilsTest.cpp
The file was modifiedllvm/include/llvm/Analysis/Utils/TFUtils.h
The file was modifiedllvm/lib/Analysis/TFUtils.cpp
Commit 3c39db0c4452218c967a8ac3ad48144fbf1159ff by rupprecht
Revert "[LoopVectorizer] Inloop vector reductions"

This reverts commit e9761688e41cb979a1fa6a79eb18145a75104933. It breaks the build:

```
~/src/llvm-project/llvm/lib/Analysis/IVDescriptors.cpp:868:10: error: no viable conversion from returned value of type 'SmallVector<[...], 8>' to function return type 'SmallVector<[...], 4>'
  return ReductionOperations;
```
The file was modifiedllvm/lib/Analysis/IVDescriptors.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/reduction-inloop-uf4.ll
The file was modifiedllvm/include/llvm/Analysis/IVDescriptors.h
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.h
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/reduction-inloop.ll
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
Commit b60f998859458a13774fff296b58f587da8e56dd by llvm-dev
[X86][SSE] Fold 128-bit PACK(EXTEND(X),EXTEND(Y)) -> CONCAT(X,Y) subvectors

This is seen in the sub-128-bit vector trunc(ext()) of comparison results

Fixes pr46585.ll regression in D66004
The file was modifiedllvm/test/CodeGen/X86/bitcast-setcc-128.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-and-bool.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-xor-bool.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-or-bool.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit f2c04239955a8e0d71aa27f7ffa3bbba6c623aef by eugenis
[msan] Remove readnone and friends from call sites.

MSan removes readnone/readonly and similar attributes from callees,
because after MSan instrumentation those attributes no longer apply.

This change removes the attributes from call sites, as well.

Failing to do this may cause DSE of paramTLS stores before calls to
readonly/readnone functions.

Differential Revision: https://reviews.llvm.org/D85259
The file was modifiedllvm/test/Instrumentation/MemorySanitizer/attributes.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
The file was modifiedllvm/include/llvm/IR/InstrTypes.h
Commit 6780d5675b7cd75279d8fc13ee1a1cc272087613 by a.bataev
[LIBOMPTARGET]Fix order of mapper data for targetDataEnd function.

targetDataMapper function fills arrays with the mapping data in the
direct order. When this function is called by targetDataBegin or
tgt_target_update functions, it works as expected. But targetDataEnd
function processes mapped data in reverse order. In this case, the base
pointer might be deleted before the associated data is deleted. Need to
reverse data, mapped by mapper, too, since it always adds data that must
be deleted at the end of the buffer.
Fixes the test declare_mapper_target_update.cpp.
Also, reduces the memry fragmentation by preallocation the memory
buffers.

Differential Revision: https://reviews.llvm.org/D85216
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
Commit 2143a90b34a7846369127e762cec5917d5e1a5bd by erich.keane
Fix _ExtInt(1) to be a i1 in memory.

The _ExtInt(1) in getTypeForMem was hitting the bool logic for expanding
to an 8 bit value.  The result was an assert, or store i1 %0, i8* %2, align 1
since the parameter IS an i1.  This patch changes the 'forMem' test to
exclude ext-int from the bool test.
The file was modifiedclang/test/CodeGen/ext-int.c
The file was modifiedclang/lib/CodeGen/CodeGenTypes.cpp
Commit 9a7b8b22a75c4b5a065775a75a6a3dd2718ac970 by hokein.wu
[clangd] Hide "swap if branch" tweak

This tweak is more like a demo, and doesn't provide much value in
practice.

Differential Revision: https://reviews.llvm.org/D85318
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp
Commit 4f20f5e8cffca7898d62070e4fcd51650e412e98 by dblaikie
Remove Olesen from LLVM code owners

I contacted Jakob Olesen about TableGen and he replied that he is no longer involved with the project.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D84958
The file was modifiedllvm/CODE_OWNERS.TXT
Commit b727cfed5e765d099f47e6785f962695408977c0 by zinenko
[MLIR][LinAlg] Use AnyTypeOf for LinalgOperand for better error msg.

Previously, `LinalgOperand` is defined with `Type<Or<..,>>`, which produces
not very readable error messages when it is not matched, e.g.,

```
'linalg.generic' op operand #0 must be anonymous_326, but got ....
```

It is simply because the `description` property is not properly set.

This diff switches to use `AnyTypeOf` for `LinalgOperand`, which automatically
generates a description based on the allowed types provided.

As a result, the error message now becomes:

```
'linalg.generic' op operand #0 must be ranked tensor of any type values or strided memref of any type values, but got ...
```

Which is clearer and more informative.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D84428
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
Commit 2918727588bbf38ac844fff70c6aa3d2dafbec1c by mascasa
[libFuzzer] Do not link pthreads on Android.

Android has pthreads included in bionic and doesn't recognize -lpthread.
The file was modifiedcompiler-rt/lib/fuzzer/CMakeLists.txt
Commit 9fdd0df9497e5b74a3739e651d218c1251b8ef78 by pifon
[mlir][nfc] Rename `promoteMemRefDescriptors` to `promoteOperands`.

`promoteMemRefDescriptors` also converts types of every operand, not only
memref-typed ones. I think `promoteMemRefDescriptors` name does not imply that.

Differential Revision: https://reviews.llvm.org/D85325
The file was modifiedmlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
Commit 40626184cf95a08f8c62192fa19cd8a71a476206 by clementval
[flang][NFC] Unify OpenMP and OpenACC structure checker

This patch remove duplicated code between the check-omp-structure and the check-acc-structure
and unify it into a check-directive-structure templated class.

Reviewed By: kiranchandramohan, sscalpone, ichoyjx

Differential Revision: https://reviews.llvm.org/D85104
The file was modifiedflang/lib/Semantics/check-omp-structure.h
The file was modifiedllvm/test/TableGen/directive1.td
The file was modifiedflang/test/Semantics/omp-clause-validity01.f90
The file was modifiedflang/test/Semantics/acc-clause-validity.f90
The file was addedflang/lib/Semantics/check-directive-structure.h
The file was modifiedflang/lib/Semantics/check-omp-structure.cpp
The file was modifiedllvm/test/TableGen/directive2.td
The file was modifiedllvm/utils/TableGen/DirectiveEmitter.cpp
The file was modifiedflang/lib/Semantics/check-acc-structure.h
The file was modifiedflang/lib/Semantics/check-acc-structure.cpp
The file was modifiedflang/test/Semantics/omp-declarative-directive.f90
Commit 7ad60f6452ff483912776ef6eda4e28c60d9da6e by mitchell
[clang-format] fix BreakBeforeBraces.MultiLine with for each macros
Summary:
The MultiLine option in BreakBeforeBraces was only handling standard
control statement, leading to invalid indentation with for each macros:

Previous behavior:

/* invalid: brace should be on the same line */
Q_FOREACH(int a; list)
{
    foo();
}

/* valid */
Q_FOREACH(int longVariable;
          list)
{
    foo();
}

To fix this, simply add the TT_ForEachMacro kind in the list of
recognized control statements for the multiline option.

This is a fix for https://bugs.llvm.org/show_bug.cgi?id=44632

Reviewers: MyDeveloperDay, mitchell-stellar

Reviewed by: mitchell-stellar

Contributed by: vthib

Subscribers: cfe-commits

Tags: #clang, #clang-format, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D85304
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/UnwrappedLineFormatter.cpp
Commit a569a0af0d96512e1d914f2e966453391f4b9561 by spatel
[InstSimplify] add vector tests for icmp with mul nuw; NFC

Also, the naming was off on a couple of tests.
The file was modifiedllvm/test/Transforms/InstSimplify/icmp-constant.ll
Commit f879c9b796210d0b2407d022e216cc4d907818a3 by spatel
[InstSimplify] fold icmp with mul nuw and constant operands

https://rise4fun.com/Alive/pZEr

  Name: mul nuw with icmp eq
  Pre: (C2 %u C1) != 0
  %a = mul nuw i8 %x, C1
  %r = icmp eq i8 %a, C2
    =>
  %r = false

  Name: mul nuw with icmp ne
  Pre: (C2 %u C1) != 0
  %a = mul nuw i8 %x, C1
  %r = icmp ne i8 %a, C2
    =>
  %r = true

There are potentially several other transforms we need to add based on:
D51625
...but it doesn't look like there was follow-up to that patch.
The file was modifiedllvm/test/Transforms/InstSimplify/icmp-constant.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/test/Transforms/InstCombine/icmp-mul.ll
Commit fcb0d8163a4f3090cb85d77b459887cf1f84cc7e by rupprecht
[lldb/test] Use realpath consistently for test root file paths.

LLDB tests assume that tests are in the test tree (the `LLDB_TEST_SRC` env variable, configured by `dotest.py`).
If this assertion doesn't hold, tests fail in strange ways. An early place this goes wrong is in `compute_mydir` which does a simple length-based substring to get the relative path. Later, we use that path to chdir to. If the test file and test tree don't agree in realpath-ness (and therefore length), this will be a cryptic error of chdir-ing to a directory that does not exist.

The actual discrepency is that the places we look for `use_lldb_suite.py` don't use a realpath, but `dotest.py` does (see initialization of `configuration.testdirs`).

It doesn't particularly matter whether we use realpath or abspath to canonicalize things, but many places end up with implicit dependencies on the canonicalized pwd being a realpath, so make them realpath consistently. Also, in the `compute_mydir` method mentioned, raise an error if the path types don't agree.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D85258
The file was modifiedlldb/test/API/use_lldb_suite.py
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
The file was modifiedlldb/packages/Python/lldbsuite/__init__.py
Commit e8760bb9a8a3a22fe22302ffe1932c13c3fcff8e by spatel
[InstSimplify] fold icmp with mul nsw and constant operands

https://rise4fun.com/Alive/slvl

  Name: mul nsw with icmp eq
  Pre: (C2 % C1) != 0
  %a = mul nsw i8 %x, C1
  %r = icmp eq i8 %a, C2
    =>
  %r = false

  Name: mul nsw with icmp ne
  Pre: (C2 % C1) != 0
  %a = mul nsw i8 %x, C1
  %r = icmp ne i8 %a, C2
    =>
  %r = true

Follow-up to the 'nuw' variation added with:
rGf879c9b79621
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/icmp-constant.ll
The file was modifiedllvm/test/Transforms/InstCombine/icmp-mul.ll
Commit 3e52667433881f42ff95ac6775b1ef1a3edd68cd by Matthew.Arsenault
AMDGPU: Fix verifier error with undef source producing s_bitset*

This needs to preserve the undef flag.
The file was modifiedllvm/test/CodeGen/AMDGPU/andorbitset.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
The file was addedllvm/test/CodeGen/AMDGPU/shrink-insts-scalar-bit-ops.mir
The file was addedllvm/test/CodeGen/AMDGPU/shrink-insts-undef-reg-verifier-error.ll
Commit b1dac0cfcd3630c9a89bd31f9010eb8e8f099f6c by Matthew.Arsenault
AMDGPU: Remove leftover test
The file was removedllvm/test/CodeGen/AMDGPU/shrink-insts-undef-reg-verifier-error.ll
Commit 48378a32af54af6ae656a3db14dc7c0d975d0f48 by antiagainst
[spirv] Fix bitwidth emulation for Workgroup storage class

If Int16 is not available, 16-bit integers inside Workgroup storage
class should be emulated via 32-bit integers. This was previously
broken because the capability querying logic was incorrectly
intercepting all storage classes where it meant to only handle
interface storage classes. Adjusted where we return to fix this.

Differential Revision: https://reviews.llvm.org/D85308
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
The file was modifiedmlir/test/Conversion/StandardToSPIRV/alloc.mlir
Commit 43c0c9252a3151660f8549e0e54e788b922b7d98 by Matthew.Arsenault
AMDGPU: Refactor buffer atomic intrinsic lowering

Move raw/struct buffer atomic lowering to separate functions. This
avoids a long nested switch, and simplifies a future patch.
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.h
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
Commit 1d25d0734a15d03f1356735719e04a517a1a8a96 by lebedev.ri
[NFC][InstCombine] Add tests for negation of old-style [n]abs, select-of-op-vs-negation-of-op
The file was modifiedllvm/test/Transforms/InstCombine/sub-of-negatible.ll
Commit f3056dcc02d5dcde1669f61084a940e1ded3dfda by lebedev.ri
[InstCombine] Negator: -(cond ? x : -x)  -->  cond ? -x : x

We were errneously only doing that for old-style abs/nabs,
but we have no such legality check on the condition of the select.

https://rise4fun.com/Alive/xBHS
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineNegator.cpp
The file was modifiedllvm/test/Transforms/InstCombine/sub-of-negatible.ll
Commit 0d03b3901d38484683cd9d6d0d6382967599e92b by antiagainst
[mlir][StandardToSPIRV] Use spv.UMod for index re-calculation

Per Vulkan's SPIR-V environment spec: "While the OpSRem and OpSMod
instructions are supported by the Vulkan environment, they require
non-negative values and thus do not enable additional functionality
beyond what OpUMod provides."

The `getOffsetForBitwidth` function is used for lowering std.load
and std.store, whose indices are of `index` type and cannot be
negative. So we should be okay to use spv.UMod directly here to
be exact. Also made the comment explicit about the assumption.

Differential Revision: https://reviews.llvm.org/D83714
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
The file was modifiedmlir/test/Conversion/StandardToSPIRV/std-ops-to-spirv.mlir
Commit d3ac30188666b182daa87d23533543543b789e97 by kadircet
[clangd] Disable define out-of-line code action on templates

Differential Revision: https://reviews.llvm.org/D85310
The file was modifiedclang-tools-extra/clangd/unittests/TweakTests.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp
Commit b0c50ef759d368b33731d0261cae78117c3accdd by mascasa
Revert "Add libFuzzer shared object build output"

This reverts commit 98d91aecb26a51225242332e73ed454c0f6cac5e since it
breaks on platforms without libstdc++.
The file was modifiedllvm/docs/LibFuzzer.rst
The file was modifiedcompiler-rt/lib/fuzzer/CMakeLists.txt
Commit 618db6803d6c8b453abe6a1e92938ee20ac3aff6 by kadircet
[clangd][NFC] Delete dead code in ExtractFunction code action
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
Commit 83eaf5d55db34b380c33aff05a1790c95a8f06a4 by Matthew.Arsenault
AMDGPU: Eliminate BUFFER_ATOMIC_PK_ADD_F16 node

This is redundant with the other no return buffer atomic node, and we
don't really need a separate type profile for it.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/BUFInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.td
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
Commit 8dc43852e4a8a5c6680d52aa6e73a75aef5a5954 by aeubanks
[Driver] Accept -fno-lto in clang-cl

Some compiler-rt tests check for the presence of the compiler accepting
-fno-lto to add that flag. Otherwise some tests don't link due to
-flto mismatch between compiling and linking.

$ cmake ... -DLLVM_ENABLE_LTO=Thin ...
$ ninja projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-x86_64-Test.exe
previously failed, now links.

Reviewed By: hans

Differential Revision: https://reviews.llvm.org/D85252
The file was modifiedclang/test/Driver/cl-options.c
The file was modifiedclang/include/clang/Driver/Options.td
Commit 9e6a1e5781d09abd91d7a3cbbc65ae7761cf9aac by aeubanks
[NewPM][LoopRotate] Rename rotate -> loop-rotate

To match legacy pass name.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D85338
The file was modifiedllvm/test/Transforms/LoopRotate/basic.ll
The file was modifiedllvm/test/Transforms/LoopRotate/freeze-crash.ll
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/test/Transforms/LoopRotate/pr35210.ll
The file was modifiedllvm/test/Transforms/LoopRotate/multiple-deopt-exits.ll
Commit ea7d0e2996ec6b72a08dbef26dadf217458ab382 by Stanislav.Mekhanoshin
[AMDGPU] gfx1031 target

Differential Revision: https://reviews.llvm.org/D85337
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.sdot8.ll
The file was modifiedllvm/include/llvm/Support/TargetParser.h
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fmad.s32.mir
The file was modifiedllvm/docs/AMDGPUUsage.rst
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.global.atomic.csub.ll
The file was modifiedclang/test/CodeGenOpenCL/amdgpu-features.cl
The file was modifiedllvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
The file was modifiedclang/lib/Basic/Targets/AMDGPU.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.sdot4.ll
The file was modifiedllvm/test/MC/AMDGPU/gfx1030_err.s
The file was modifiedllvm/lib/Support/TargetParser.cpp
The file was modifiedllvm/test/MC/AMDGPU/gfx1030_new.s
The file was modifiedllvm/test/MC/Disassembler/AMDGPU/gfx1030_dasm_new.txt
The file was modifiedllvm/lib/ObjectYAML/ELFYAML.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/ELF.h
The file was modifiedclang/lib/Basic/Targets/NVPTX.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/elf-header-flags-mach.ll
The file was modifiedclang/test/Driver/amdgpu-mcpu.cl
The file was modifiedllvm/lib/Target/AMDGPU/GCNProcessors.td
The file was modifiedllvm/test/CodeGen/AMDGPU/hsa-note-no-func.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.atomic.csub.ll
The file was modifiedclang/include/clang/Basic/Cuda.h
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/idot8s.ll
The file was modifiedclang/test/Driver/amdgpu-macros.cl
Commit 105608a4c2821ca8f8340104614c1176ed1ed82d by Stanislav.Mekhanoshin
[AMDGPU] Added missing gfx1031 cases to CGOpenMPRuntimeGPU.cpp
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
Commit ec8c172d01eb14eba890f36205da0613dda7f742 by Matthew.Arsenault
AMDGPU: Correct prolog SP initialization logic

Having callees that will read SP is not the only reason we need to
reference the stack pointer.
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.h
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/non-entry-alloca.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/dynamic-alloca-uniform.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/non-entry-alloca.ll
Commit 7d057efddc00ba7d03e6e684f23dd9b09fbd0527 by tra
[CUDA] Work around a bug in rint/nearbyint caused by a broken implementation provided by CUDA.

Normally math functions are forwarded to __nv_* counterparts provided by CUDA's
libdevice bitcode. However, __nv_rint*()/__nv_nearbyint*() functions there have
a bug -- they use round() which rounds *up* instead of rounding towards the
nearest integer, so we end up with rint(2.5f) producing 3.0 instead of expected
2.0. The broken bitcode is not actually used by NVCC itself, which has both a
work-around in CUDA headers and, in recent versions, uses correct
implementations in NVCC's built-ins.

This patch implements equivalent workaround and directs rint*/nearbyint* to
__builtin_* variants that produce correct results.

Differential Revision: https://reviews.llvm.org/D85236
The file was modifiedclang/lib/Headers/__clang_cuda_math.h
Commit 1dbac09dd6ec8587ae7e16ed669bf73889a21957 by rupprecht
[lldb/test] Support git commit version ids for clang.

`getCompilerVersion` assumes that `clang --version` prints out a string like `version [0-9\.]+`.
If clang is built from trunk, the version line might look like `clang version trunk (123abc)`.

Since there isn't any way of knowing by the commit id alone whether one commit is newer or older than another git commit (or clang version), assume that clang with a version id like this is very close to trunk. For example, any tests with `@skipIf(compiler="clang", compiler_version=['<', '8'])` should be run.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D85248
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
Commit 20a568c29db0117a6f32861826fedbb33329e759 by rahmanl
[Propeller]: Use a descriptive temporary symbol name for the end of the basic block.

This patch changes the functionality of AsmPrinter to name the basic block end labels as LBB_END${i}_${j}, with ${i} being the identifier for the function and ${j} being the identifier for the basic block. The new naming scheme is consistent with how basic block labels are named (.LBB${i}_{j}), and how function end symbol are named (.Lfunc_end${i}) and helps to write stronger tests for the upcoming patch for BB-Info section (as proposed in https://lists.llvm.org/pipermail/llvm-dev/2020-July/143512.html). The end label is used with basicblock-labels (BB-Info section in future) and basicblock-sections to compute the size of basic blocks and basic block sections, respectively. For BB sections, the section containing the entry basic block will not have a BB end label since it already gets the function end-label.
This label is cached for every basic block (CachedEndMCSymbol) like the label for the basic block (CachedMCSymbol).

Differential Revision: https://reviews.llvm.org/D83885
The file was modifiedllvm/include/llvm/CodeGen/MachineBasicBlock.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/test/CodeGen/X86/basic-block-sections-clusters.ll
The file was modifiedllvm/lib/CodeGen/MachineBasicBlock.cpp
The file was modifiedllvm/test/DebugInfo/X86/basic-block-sections_1.ll
The file was modifiedllvm/test/CodeGen/X86/basic-block-sections-listbb.ll
The file was modifiedllvm/test/CodeGen/X86/basic-block-sections.ll
Commit 0bcda1a26130e1e91903db6f7e51d821cf3fe85b by Stanislav.Mekhanoshin
[AMDGPU] Scavenge temp reg for AGPR spill

Differential Revision: https://reviews.llvm.org/D85234
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was addedllvm/test/CodeGen/AMDGPU/spill-agpr.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
Commit 40470eb27a5c97b01e89d8825626487b0682abec by georgios.rokos
[libomptarget][NFC] Replace `%ld` with PRId64 for data of type int64_t.

The standard way of printing `int64_t` data is via the PRId64 macro, `ld`
is for `long int` and int64_t is not guaranteed to be typedef'ed as `long int`
on all platforms. E.g. on Windows we get mismatch warnings.

Differential Revision: https://reviews.llvm.org/D85353
The file was modifiedopenmp/libomptarget/plugins/cuda/src/rtl.cpp
The file was modifiedopenmp/libomptarget/src/rtl.cpp
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
The file was modifiedopenmp/libomptarget/src/device.cpp
Commit f3b41502554f2948ad00531dde7c3f53973de960 by gyurgyikcp
[libc] Add strspn implementation and std::bitset

Reviewed By: sivachandra, abrachet

Differential Revision: https://reviews.llvm.org/D85103
The file was addedlibc/test/src/string/strspn_test.cpp
The file was addedlibc/test/utils/CPP/CMakeLists.txt
The file was modifiedlibc/utils/CPP/CMakeLists.txt
The file was modifiedlibc/config/linux/aarch64/entrypoints.txt
The file was modifiedlibc/config/linux/x86_64/entrypoints.txt
The file was addedlibc/src/string/strspn.cpp
The file was modifiedlibc/test/src/string/CMakeLists.txt
The file was addedlibc/test/utils/CPP/bitset_test.cpp
The file was modifiedlibc/test/utils/CMakeLists.txt
The file was modifiedlibc/src/string/CMakeLists.txt
The file was addedlibc/src/string/strspn.h
The file was addedlibc/utils/CPP/Bitset.h
Commit 41b1aefecb9447620dd182b0352abed0df05665c by jdenny.ornl
[OpenMP] Fix `present` diagnostic for array extension

For example, without this patch, the following fails as expected with
or without the `present` modifier, but the `present` modifier doesn't
produce its usual diagnostic:

```
#pragma omp target data map(alloc: arr[0:2])
{
   #pragma omp target map(present, tofrom: arr[0:100]) // not fully present
   ;
}
```

Reviewed By: grokos, vzakhari

Differential Revision: https://reviews.llvm.org/D85320
The file was addedopenmp/libomptarget/test/mapping/present/target_array_extension.c
The file was modifiedopenmp/libomptarget/src/device.cpp
The file was addedopenmp/libomptarget/test/mapping/present/target_data_array_extension.c
Commit 8c8bb128dfd09f84b27b9e732cf1355582b1d019 by jdenny.ornl
[OpenMP] Fix `target data` exit for array extension

For example:

```
#pragma omp target data map(tofrom:arr[0:100])
{
   #pragma omp target exit data map(delete:arr[0:100])
   #pragma omp target enter data map(alloc:arr[98:2])
}
```

Without this patch, the transfer at the end of the target data region
is broken and fails depending on the target device.  According to my
read of the spec, the transfer shouldn't even be attempted because
`arr[0:100]` isn't (fully) present there.  To fix that, this patch
makes `DeviceTy::getTgtPtrBegin` return null for this case.

Reviewed By: grokos

Differential Revision: https://reviews.llvm.org/D85342
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
The file was addedopenmp/libomptarget/test/mapping/target_data_array_extension_at_exit.c
Commit f496950001c47724867912d863858db0a81b4309 by tlively
[WebAssembly] Fix types in wasm_simd128.h and add tests

47f7174ffa changed the types used in the Wasm SIMD builtin functions,
but not all of their uses in wasm_simd128.h were updated. This commit
fixes wasm_simd128.h and adds tests to make sure similar problems do
not pass uncaught in the future.

Differential Revision: https://reviews.llvm.org/D85347
The file was modifiedclang/lib/Headers/wasm_simd128.h
The file was addedclang/test/Headers/wasm.c
The file was addedclang/test/Headers/wasm.cpp
Commit 0315571a19bb27da1b68088b07f1368747dd9438 by spatel
[InstCombine] add tests for icmp with mul nsw/nuw; NFC
The file was modifiedllvm/test/Transforms/InstCombine/icmp-mul.ll
Commit c66169136fe667d653ff40ba4bd9f6047702e93c by spatel
[InstCombine] fold icmp with 'mul nsw/nuw' and constant operands

This also removes a more specific fold that only handled icmp with 0.

https://rise4fun.com/Alive/sdM9

  Name: mul nsw with icmp eq
  Pre: (C1 != 0) && (C2 % C1) == 0
  %a = mul nsw i8 %x, C1
  %r = icmp eq i8 %a, C2
    =>
  %r = icmp eq i8 %x, C2 / C1

  Name: mul nuw with icmp eq
  Pre: (C1 != 0) && (C2 %u C1) == 0
  %a = mul nuw i8 %x, C1
  %r = icmp eq i8 %a, C2
    =>
  %r = icmp eq i8 %x, C2 /u C1

  Name: mul nsw with icmp ne
  Pre: (C1 != 0) && (C2 % C1) == 0
  %a = mul nsw i8 %x, C1
  %r = icmp ne i8 %a, C2
    =>
  %r = icmp ne i8 %x, C2 / C1

  Name: mul nuw with icmp ne
  Pre: (C1 != 0) && (C2 %u C1) == 0
  %a = mul nuw i8 %x, C1
  %r = icmp ne i8 %a, C2
    =>
  %r = icmp ne i8 %x, C2 /u C1
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
The file was modifiedllvm/test/Transforms/InstCombine/icmp-mul.ll
Commit 076b120bebfd727b502208601012a44ab2e1028e by richard
CFG: Destroy temporaries in (a,b) expression in the correct order.
The file was modifiedclang/lib/Analysis/CFG.cpp
The file was modifiedclang/test/Analysis/cfg.cpp
Commit df46f174db5bbedb66d77041308d48e701c77e96 by Jonas Devlieghere
[lldb] Modify the `skipIfRemote` decorator so we can skip all PExpect tests.

This patch modifies the skipIfRemote decorator so it can apply to a
whole class, which allows us to skip all PExpect tests as a whole.

Differential revision: https://reviews.llvm.org/D85365
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbpexpect.py
The file was modifiedlldb/test/API/commands/expression/multiline-completion/TestMultilineCompletion.py
The file was modifiedlldb/test/API/driver/batch_mode/TestBatchMode.py
The file was modifiedlldb/test/API/commands/gui/basic/TestGuiBasic.py
The file was modifiedlldb/test/API/commands/gui/breakpoints/TestGuiBreakpoints.py
The file was modifiedlldb/test/API/commands/gui/basicdebug/TestGuiBasicDebug.py
The file was modifiedlldb/packages/Python/lldbsuite/test/decorators.py
Commit 31137b87efc12b1d8cdd8307bcddb986e5c23c61 by Jonas Devlieghere
[lldb] Skip TestProcessConnect when running remotely

This test doesn't make much sense when already running remotely.
The file was modifiedlldb/test/API/functionalities/gdb_remote_client/TestProcessConnect.py
Commit e1de85f9f4dae68b2c83d8821515c1f5db765baa by gclayton
Add verification for DW_AT_decl_file and DW_AT_call_file.

LTO builds have been creating invalid DWARF and one of the errors was a file index that was out of bounds. "llvm-dwarfdump --verify" will check all file indexes for line tables already, but there are no checks for the validity of file indexes in attributes.

The verification will verify if there is a DW_AT_decl_file/DW_AT_call_file that:
- there is a line table for the compile unit
- the file index is valid
- the encoding is appropriate

Tests are added that test all of the above conditions.

Differential Revision: https://reviews.llvm.org/D84817
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
The file was addedllvm/test/tools/llvm-dwarfdump/X86/verify_attr_file_indexes.yaml
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
The file was addedllvm/test/tools/llvm-dwarfdump/X86/verify_attr_file_indexes_no_files.yaml
The file was modifiedllvm/test/tools/llvm-dwarfdump/X86/verify_debug_info.s
The file was addedllvm/test/tools/llvm-dwarfdump/X86/verify_file_encoding.yaml
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
Commit b2ab375d1f08ab0faecc20f0340cb972f31010a7 by zinenko
[mlir] use the new stateful LLVM type translator by default

Previous type model in the LLVM dialect did not support identified structure
types properly and therefore could use stateless translations implemented as
free functions. The new model supports identified structs and must keep track
of the identified structure types present in the target context (LLVMContext or
MLIRContext) to avoid creating duplicate structs due to LLVM's type
auto-renaming. Expose the stateful type translation classes and use them during
translation, storing the state as part of ModuleTranslation.

Drop the test type translation mechanism that is no longer necessary and update
the tests to exercise type translation as part of the main translation flow.

Update the code in vector-to-LLVM dialect conversion that relied on stateless
translation to use the new class in a stateless manner.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D85297
The file was modifiedmlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
The file was modifiedmlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
The file was modifiedmlir/lib/Target/LLVMIR/TypeTranslation.cpp
The file was removedmlir/test/lib/Target/CMakeLists.txt
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
The file was removedmlir/test/lib/Target/TestLLVMTypeTranslation.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
The file was modifiedmlir/test/Target/import.ll
The file was modifiedmlir/include/mlir/Target/LLVMIR/TypeTranslation.h
The file was modifiedmlir/tools/mlir-translate/mlir-translate.cpp
The file was modifiedmlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
The file was modifiedmlir/test/Target/llvmir-types.mlir
The file was modifiedmlir/test/lib/CMakeLists.txt
Commit 927afdffbb1deebd83b86d024b67687d758521d0 by Jonas Devlieghere
[lldb] Skip test_launch_simple on Windows

Because stdio manipulation unsupported on Windows.
The file was modifiedlldb/test/API/python_api/target/TestTargetAPI.py
Commit 13796d14238baabff972e15ceddb4ae61b1584b8 by craig.topper
[X86] Add test case for PR47000. NFC
The file was addedllvm/test/CodeGen/X86/pr47000.ll
Commit 08b2d0a963dbbf54317a137d69f430b347d1bfae by craig.topper
[X86] Disable copy elision in LowerMemArgument for scalarized vectors when the loc VT is a different size than the original element.

For example a v4f16 argument is scalarized to 4 i32 values. So
the values are spread out instead of being packed tightly like
in the original vector.

Fixes PR47000.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/pr47000.ll