SuccessChanges

Summary

  1. [clang][AArch64] Correct return type of Neon vqmovun intrinsics (details)
  2. [clang] Fix incorrect call to TextDiagnostic::printDiagnosticMessage (details)
  3. [LSR] Preserve MSSA when using SplitCriticalEdge. (details)
  4. Fix crash in the pass pipeline when local reproducer is enabled (details)
  5. [CodeGen] Fixing inconsistent ABI mangling of vlaues in SelectionDAGBuilder (details)
  6. [Test] Test auto-update (details)
  7. [lld][ELF][test] Add additional LTO testing (details)
  8. [RISC-V] Implement RISCVInstrInfo::isCopyInstrImpl() (details)
  9. [compiler-rt] Fix atomic support functions on 32-bit architectures (details)
  10. [SyntaxTree][Synthesis] Implement `deepCopy` (details)
  11. [mlir] Shape.AssumingOp implements RegionBranchOpInterface. (details)
Commit 349af8054218017a2ac0c4bfeddd63e6ccbf4a21 by david.spickett
[clang][AArch64] Correct return type of Neon vqmovun intrinsics

Neon intrinsics vqmovunh_s16, vqmovuns_s32, vqmovund_s64
should have unsigned return types.

See https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics?search=vqmovun

Fixes https://bugs.llvm.org/show_bug.cgi?id=46840

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D85118
The file was modifiedclang/test/CodeGen/aarch64-neon-misc.c
The file was modifiedclang/test/Sema/arm64-neon-header.c
The file was modifiedclang/include/clang/Basic/arm_neon.td
The file was modifiedclang/test/CodeGen/aarch64-neon-intrinsics.c
Commit 4eae6fc95f95563a73a510a8b09cfce01004930a by andrzej.warzynski
[clang] Fix incorrect call to TextDiagnostic::printDiagnosticMessage

As per the documentation, the 2nd argument in printDiagnosticMessage
should be a bool that specifies whether the underlying message is a
continuation note diagnostic or not. More specifically, it should be:
```
Level == DiagnosticsEngine::Note
```
instead of:
```
Level
```

This change means that `no input file` in the following scenario will be
now correctly printed in bold:
```
$ bin/clang
clang: error: no input files
```
In terminals that don't support text formatting the behaviour doesn't
change.

Differential Revision: https://reviews.llvm.org/D87816
The file was modifiedclang/lib/Frontend/TextDiagnosticPrinter.cpp
Commit 57ae9bb9323548b2ad4ba8274c3910bf9c764983 by flo
[LSR] Preserve MSSA when using SplitCriticalEdge.

LSR claims to MemorySSA, but we also have to make sure it is preserved
when splitting critical edges. This can be done by passing MSSAU to
SplitCriticalEdge.

Fixes PR47557.
The file was addedllvm/test/Analysis/MemorySSA/update-remove-dead-blocks.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Commit 702f06ad14ac61d364b773e5a1f4d8b0b0214553 by joker.eph
Fix crash in the pass pipeline when local reproducer is enabled

This crash only happens when a function pass is followed by a module
pass. In this case the splitting of the pass pipeline didn't handle
properly the verifier passes and ended up with an odd number of pass in
the pipeline, breaking an assumption of the local crash reproducer
executor and hitting an assertion.

Differential Revision: https://reviews.llvm.org/D88000
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedmlir/test/Pass/crash-recovery.mlir
Commit 53d238a961d14eae46f6f2b296ce48026c7bd0a1 by lucas.prates
[CodeGen] Fixing inconsistent ABI mangling of vlaues in SelectionDAGBuilder

SelectionDAGBuilder was inconsistently mangling values based on ABI
Calling Conventions when getting them through copyFromRegs in
SelectionDAGBuilder, causing duplicate value type convertions for
function arguments. The checking for the mangling requirement was based
on the value's originating instruction and was performed outside of, and
inspite of, the regular Calling Convention Lowering.

The issue could be observed in a scenario such as:

```
%arg1 = load half, half* %const, align 2
%arg2 = call fastcc half @someFunc()
call fastcc void @otherFunc(half %arg1, half %arg2)
; Here, %arg2 was incorrectly mangled twice, as the CallConv data from
; the call to @someFunc() was taken into consideration for the check
; when getting the value for processing the call to @otherFunc(...),
; after the proper convertion had taken place when lowering the return
; value of the first call.
```

This patch fixes the issue by disregarding the Calling Convention
information for such copyFromRegs, making sure the ABI mangling is
properly contanined in the Calling Convention Lowering.

This fixes Bugzilla #47454.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D87844
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was addedllvm/test/CodeGen/ARM/pr47454.ll
Commit 98aed8aa00dcc021686972734b5356c831328721 by mkazantsev
[Test] Test auto-update
The file was modifiedllvm/test/Transforms/IndVarSimplify/eliminate-comparison.ll
Commit fa6da90aef004339e768c84d648f449348a5b13c by james.henderson
[lld][ELF][test] Add additional LTO testing

The additional testing is testing we previously had in a downstream test
suite.

Reviewed by: grimar, MaskRay

Differential Revision: https://reviews.llvm.org/D87824
The file was addedlld/test/ELF/lto/undef-mixed2.test
The file was modifiedlld/test/ELF/lto/wrap-2.ll
The file was addedlld/test/ELF/lto/archive-mixed.test
The file was modifiedlld/test/ELF/lto/internalize-basic.ll
Commit 8cf6778d3040b33db768bb7542630d9820a72e28 by Alexander.Richardson
[RISC-V] Implement RISCVInstrInfo::isCopyInstrImpl()

This does not result in changes for any of the current tests, but it might
improve debug information in some cases.

Reviewed By: luismarques

Differential Revision: https://reviews.llvm.org/D86522
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.h
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.cpp
Commit aa85c6f2a528792e2ff778a36fb6f35a01e8191c by Alexander.Richardson
[compiler-rt] Fix atomic support functions on 32-bit architectures

The code currently uses __c11_atomic_is_lock_free() to detect whether an
atomic operation is natively supported. However, this can result in a
runtime function call to determine whether the given operation is lock-free
and clang generating a call to e.g. __atomic_load_8 since the branch is
not a constant zero. Since we are implementing those runtime functions, we
must avoid those calls. This patch replaces __c11_atomic_is_lock_free()
with __atomic_always_lock_free() which always results in a compile-time
constant value. This problem was found while compiling atomic.c for MIPS32
since the -Watomic-alignment warning was being triggered and objdump showed
an undefined reference to _atomic_is_lock_free.

In addition to fixing 32-bit platforms this also enables the 16-byte case
that was disabled in r153779 (185f2edd70a34d28b305df0cd8ce519ecbca2cfd).

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D86510
The file was modifiedcompiler-rt/lib/builtins/atomic.c
Commit 4a5cc389c51d267f39286a9a8c58c32f758b9d4b by ecaldas
[SyntaxTree][Synthesis] Implement `deepCopy`

Differential Revision: https://reviews.llvm.org/D87749
The file was modifiedclang/include/clang/Tooling/Syntax/BuildTree.h
The file was modifiedclang/unittests/Tooling/Syntax/SynthesisTest.cpp
The file was modifiedclang/lib/Tooling/Syntax/Synthesis.cpp
Commit ffdd4a46a9a90d7b63b840c4b3c775074815f3ed by tpopp
[mlir] Shape.AssumingOp implements RegionBranchOpInterface.

This adds support for the interface and provides unambigious information
on the control flow as it is unconditional on any runtime values.
The code is tested through confirming that buffer-placement behaves as
expected.

Differential Revision: https://reviews.llvm.org/D87894
The file was modifiedmlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
The file was modifiedmlir/lib/Dialect/Shape/IR/Shape.cpp
The file was modifiedmlir/test/Transforms/buffer-placement.mlir