FailedChanges

Summary

  1. [clangd][NFC] Delete dead code in ExtractFunction code action (details)
  2. AMDGPU: Eliminate BUFFER_ATOMIC_PK_ADD_F16 node (details)
  3. [Driver] Accept -fno-lto in clang-cl (details)
  4. [NewPM][LoopRotate] Rename rotate -> loop-rotate (details)
  5. [AMDGPU] gfx1031 target (details)
  6. [AMDGPU] Added missing gfx1031 cases to CGOpenMPRuntimeGPU.cpp (details)
  7. AMDGPU: Correct prolog SP initialization logic (details)
  8. [CUDA] Work around a bug in rint/nearbyint caused by a broken implementation provided by CUDA. (details)
  9. [lldb/test] Support git commit version ids for clang. (details)
  10. [Propeller]: Use a descriptive temporary symbol name for the end of the basic block. (details)
  11. [AMDGPU] Scavenge temp reg for AGPR spill (details)
  12. [libomptarget][NFC] Replace `%ld` with PRId64 for data of type int64_t. (details)
  13. [libc] Add strspn implementation and std::bitset (details)
  14. [OpenMP] Fix `present` diagnostic for array extension (details)
  15. [OpenMP] Fix `target data` exit for array extension (details)
  16. [WebAssembly] Fix types in wasm_simd128.h and add tests (details)
  17. [InstCombine] add tests for icmp with mul nsw/nuw; NFC (details)
  18. [InstCombine] fold icmp with 'mul nsw/nuw' and constant operands (details)
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.h
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/SIISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.td
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/include/clang/Driver/Options.td
The file was modifiedclang/test/Driver/cl-options.c
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/freeze-crash.ll
The file was modifiedllvm/test/Transforms/LoopRotate/multiple-deopt-exits.ll
The file was modifiedllvm/test/Transforms/LoopRotate/pr35210.ll
The file was modifiedllvm/test/Transforms/LoopRotate/basic.ll
The file was modifiedllvm/lib/Passes/PassRegistry.def
Commit ea7d0e2996ec6b72a08dbef26dadf217458ab382 by Stanislav.Mekhanoshin
[AMDGPU] gfx1031 target

Differential Revision: https://reviews.llvm.org/D85337
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fmad.s32.mir
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/elf-header-flags-mach.ll
The file was modifiedllvm/test/MC/Disassembler/AMDGPU/gfx1030_dasm_new.txt
The file was modifiedllvm/lib/Support/TargetParser.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.atomic.csub.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.sdot8.ll
The file was modifiedllvm/test/MC/AMDGPU/gfx1030_new.s
The file was modifiedllvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
The file was modifiedclang/test/CodeGenOpenCL/amdgpu-features.cl
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedclang/test/Driver/amdgpu-mcpu.cl
The file was modifiedclang/lib/Basic/Targets/AMDGPU.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/idot8s.ll
The file was modifiedllvm/include/llvm/Support/TargetParser.h
The file was modifiedllvm/lib/ObjectYAML/ELFYAML.cpp
The file was modifiedclang/lib/Basic/Targets/NVPTX.cpp
The file was modifiedclang/include/clang/Basic/Cuda.h
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.sdot4.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.global.atomic.csub.ll
The file was modifiedllvm/test/MC/AMDGPU/gfx1030_err.s
The file was modifiedllvm/include/llvm/BinaryFormat/ELF.h
The file was modifiedclang/test/Driver/amdgpu-macros.cl
The file was modifiedllvm/docs/AMDGPUUsage.rst
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/test/CodeGen/AMDGPU/GlobalISel/dynamic-alloca-uniform.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.h
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/non-entry-alloca.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/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/test/CodeGen/X86/basic-block-sections.ll
The file was modifiedllvm/test/DebugInfo/X86/basic-block-sections_1.ll
The file was modifiedllvm/lib/CodeGen/MachineBasicBlock.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/test/CodeGen/X86/basic-block-sections-listbb.ll
The file was modifiedllvm/include/llvm/CodeGen/MachineBasicBlock.h
The file was modifiedllvm/test/CodeGen/X86/basic-block-sections-clusters.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/SILowerSGPRSpills.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIInstructions.td
The file was addedllvm/test/CodeGen/AMDGPU/spill-agpr.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.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/src/rtl.cpp
The file was modifiedopenmp/libomptarget/plugins/cuda/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 modifiedlibc/config/linux/x86_64/entrypoints.txt
The file was modifiedlibc/config/linux/aarch64/entrypoints.txt
The file was addedlibc/test/utils/CPP/bitset_test.cpp
The file was modifiedlibc/src/string/CMakeLists.txt
The file was addedlibc/utils/CPP/Bitset.h
The file was modifiedlibc/test/utils/CMakeLists.txt
The file was modifiedlibc/utils/CPP/CMakeLists.txt
The file was addedlibc/src/string/strspn.cpp
The file was addedlibc/src/string/strspn.h
The file was modifiedlibc/test/src/string/CMakeLists.txt
The file was addedlibc/test/utils/CPP/CMakeLists.txt
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 modifiedopenmp/libomptarget/src/device.cpp
The file was addedopenmp/libomptarget/test/mapping/present/target_array_extension.c
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 addedclang/test/Headers/wasm.c
The file was addedclang/test/Headers/wasm.cpp
The file was modifiedclang/lib/Headers/wasm_simd128.h
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