Changes

Summary

  1. [JITLink][RISCV] Support R_RISCV_SET* and R_RISCV_32_PCREL relocations (details)
  2. [libc++] Use addressof in unordered_set. (details)
  3. [mlir] Add SingleBlockImplicitTerminator<"tensor::YieldOp"> to PadOp. (details)
  4. [AArch64] Optimize add/sub with immediate through MIPeepholeOpt (details)
  5. reapply de872382951 "[JITLink] Add anonymous symbols in LinkGraph..." (details)
  6. [DAG] Convert truncstore(extend(x)) back to store(x) (details)
Commit f7d4cafe5a6a51ccc6072c9dd304ced4f8e96aa7 by fourdim
[JITLink][RISCV] Support R_RISCV_SET* and R_RISCV_32_PCREL relocations

This patch supports R_RISCV_SET* and R_RISCV_32_PCREL relocations in JITLink.

Reviewed By: StephenFan

Differential Revision: https://reviews.llvm.org/D117082
The file was addedllvm/test/ExecutionEngine/JITLink/RISCV/ELF_reloc_set.s
The file was addedllvm/test/ExecutionEngine/JITLink/RISCV/ELF_pc_relative.s
The file was modifiedllvm/include/llvm/ExecutionEngine/JITLink/riscv.h
The file was modifiedllvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
The file was modifiedllvm/lib/ExecutionEngine/JITLink/riscv.cpp
Commit 26544b98f7bf744d2ccd29cc6559db24bc1a4e50 by koraq
[libc++] Use addressof in unordered_set.

This addresses the usage of `operator&` in `<unordered_set>`.

(Note there are still more headers with the same issue.)

Reviewed By: #libc, philnik, Quuxplusone

Differential Revision: https://reviews.llvm.org/D117917
The file was addedlibcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.addressof.compile.pass.cpp
The file was addedlibcxx/test/std/containers/unord/unord.set/iterator.operators.addressof.compile.pass.cpp
The file was addedlibcxx/test/std/containers/unord/unord.set/insert_hint_const_lvalue.addressof.compile.pass.cpp
The file was modifiedlibcxx/include/unordered_set
The file was addedlibcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.addressof.compile.pass.cpp
The file was addedlibcxx/test/std/containers/unord/unord.set/insert_hint_rvalue.addressof.compile.pass.cpp
The file was addedlibcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move.addressof.compile.pass.cpp
The file was addedlibcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.addressof.compile.pass.cpp
The file was addedlibcxx/test/std/containers/unord/unord.set/emplace_hint.addressof.compile.pass.cpp
Commit 4041354b4c12fb4329853b67f61b8617252188d6 by pifon
[mlir] Add SingleBlockImplicitTerminator<"tensor::YieldOp"> to PadOp.
The file was modifiedmlir/test/Dialect/Tensor/invalid.mlir
The file was modifiedmlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
Commit 93deac2e2ba96248c05441a0bfa8385a73d78acb by david.green
[AArch64] Optimize add/sub with immediate through MIPeepholeOpt

Fixes the build issue with D111034, whose goal was to optimize
add/sub with long immediates.

Optimize ([add|sub] r, imm) -> ([ADD|SUB] ([ADD|SUB] r, #imm0, lsl #12), #imm1),
if imm == (imm0<<12)+imm1. and both imm0 and imm1 are non-zero 12-bit unsigned
integers.

Optimize ([add|sub] r, imm) -> ([SUB|ADD] ([SUB|ADD] r, #imm0, lsl #12), #imm1),
if imm == -(imm0<<12)-imm1, and both imm0 and imm1 are non-zero 12-bit unsigned
integers.

The change which fixed the build issue in D111034 was the use of new virtual
registers so that SSA form is maintained until deleting MI.

Differential Revision: https://reviews.llvm.org/D117429
The file was addedllvm/test/CodeGen/AArch64/addsub-24bit-imm.mir
The file was modifiedllvm/test/Transforms/CodeGenPrepare/AArch64/large-offset-gep.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
The file was modifiedllvm/test/CodeGen/AArch64/addsub.ll
Commit 0283b07746e879961fd9361579e0da2a62430696 by luxufan
reapply de872382951 "[JITLink] Add anonymous symbols in LinkGraph..."
with fixes

This reapply `de872382951572b70dfaefe8d77eb98d15586115`, which was
reverted in `fdb6578514dd3799ad23c8bbb7699577c0fb414d`

Add `# REQUIRES: asserts` in test file `anonymous_symbol.s` to disable
this test for non-debug build
The file was modifiedllvm/include/llvm/ExecutionEngine/JITLink/riscv.h
The file was modifiedllvm/lib/ExecutionEngine/JITLink/riscv.cpp
The file was modifiedllvm/lib/ExecutionEngine/JITLink/ELFLinkGraphBuilder.h
The file was addedllvm/test/ExecutionEngine/JITLink/RISCV/anonymous_symbol.s
Commit b27e5459d51fd5ba80a1182e5bd8c0fd5e2e6a49 by david.green
[DAG] Convert truncstore(extend(x)) back to store(x)

Pulled out of D106237, this folds truncstore(extend(x)) back to store(x)
if the original store was legal. This can come up due to the order we
fold nodes. A fold from X86 needs to be adjusted to prevent infinite
loops, to have it pick the operand of a trunc more directly.

Differential Revision: https://reviews.llvm.org/D117901
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/copy-illegal-type.ll