[all-commits] [llvm/llvm-project] 026e0f: [RISCV] Add back handling of X > -1 to ISD::SETCC ...

Wang Pengcheng via All-commits all-commits at lists.llvm.org
Fri Aug 11 00:08:16 PDT 2023


  Branch: refs/heads/release/17.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 026e0ff58c1eb8375dffb7d52d7623eff999597d
      https://github.com/llvm/llvm-project/commit/026e0ff58c1eb8375dffb7d52d7623eff999597d
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    A llvm/test/CodeGen/RISCV/pr64503.ll

  Log Message:
  -----------
  [RISCV] Add back handling of X > -1 to ISD::SETCC lowering.

There are cases where the -1 doesn't become visible until lowering
so the folding doesn't have a chance to run.

I think in these cases there is a missed DAGCombine for truncate (undef),
which I may fix separately, but RISC-V backend should protect itself.

Fixes #64503.

Reviewed By: asb

Differential Revision: https://reviews.llvm.org/D157314

(cherry picked from commit 7cc615413fd7c93421052a193bc3e114465747c9)


  Commit: caa1a8b0d6b51d0cf44ca9d0cd1cdd9af370583e
      https://github.com/llvm/llvm-project/commit/caa1a8b0d6b51d0cf44ca9d0cd1cdd9af370583e
  Author: Sean Fertile <sd.fertile at gmail.com>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
    A llvm/test/CodeGen/PowerPC/aix-toc-data-offset.ll

  Log Message:
  -----------
  [PPC][AIX] Fix toc-data peephole bug and some related cleanup.

Set the ReplaceFlags variable to false, since there is code meant only
for the ADDItocHi/ADDItocL nodes. This has the side effect of disabling
the peephole when the load/store instruction has a non-zero offset.
This patch also fixes retrieving the `ImmOpnd` node from the AIX small
code model pseduos and does the same for the register operand node.
This allows cleaning up the later calls to replaceOperands.
Finally move calculating the MaxOffset into the code guarded by
ReplaceFlags as it is only used there and the comment is specific to the ELF
ABI.

Fixes https://github.com/llvm/llvm-project/issues/63927

Differential Revision: https://reviews.llvm.org/D155957

(cherry picked from commit b37c7ed0c95c7f24758b1532f04275b4bb65d3c1)


  Commit: 506f5b47a2fcd1b871b39702ee9ecbe50a798cb3
      https://github.com/llvm/llvm-project/commit/506f5b47a2fcd1b871b39702ee9ecbe50a798cb3
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M llvm/test/CodeGen/AArch64/sign-return-address.ll

  Log Message:
  -----------
  [AArch64] Refactor checks in sign-return-address.ll test

Using implicit CHECK prefix in one FileCheck invocation and explicit
CHECK-V83A in the other one seems to misguide to use CHECK: lines as
a common matching prefix at various places. Also note that

; CHECK, CHECK-V83A: ...

line only matches the "CHECK-V83A" prefix.

This commit explicitly splits the checks into common ones (CHECK) and
invocation-specific ones (COMPAT and V83A) and updates the assertions
with the update_llc_test_checks.py script.

Reviewed By: efriedma, MaskRay

Differential Revision: https://reviews.llvm.org/D156327

(cherry picked from commit 4210204f521be3caa0e60bd596af3444cbd44d04)


  Commit: 56f8c059f4d0104cfee27c5994f95861d0d7f2bf
      https://github.com/llvm/llvm-project/commit/56f8c059f4d0104cfee27c5994f95861d0d7f2bf
  Author: Oliver Stannard <oliver.stannard at arm.com>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-regsave.mir
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-thunk.ll
    M llvm/test/CodeGen/AArch64/sign-return-address-cfi-negate-ra-state.ll
    M llvm/test/CodeGen/AArch64/sign-return-address.ll

  Log Message:
  -----------
  [AArch64][PtrAuth] Fix unwind state for tail calls

When generating unwind tables for code which uses return-address
signing, we need to toggle the RA_SIGN_STATE DWARF register around any
tail-calls, because these require the return address to be authenticated
before the call, and could throw an exception. This is done using the
.cfi_negate_ra_state directive before the call, and .cfi_restore_state
at the start of the next basic block.

However, since D153098, the .cfi_restore_state isn't being inserted,
because the CFIFixup pass isn't being run. This re-enables that pass
when return-adress signing is enabled.

Reviewed By: ikudrin, MaskRay

Differential Revision: https://reviews.llvm.org/D156428

(cherry picked from commit f2e7285b03fbfc263c8a2eaa2b5e2e1cfafc6abd)


  Commit: 7fc3c153a878a7f8f16df761a90f164c9f090ec9
      https://github.com/llvm/llvm-project/commit/7fc3c153a878a7f8f16df761a90f164c9f090ec9
  Author: Weining Lu <luweining at loongson.cn>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M lld/ELF/Arch/LoongArch.cpp
    A lld/test/ELF/loongarch-pcrel20-s2.s

  Log Message:
  -----------
  [lld][LoongArch] Support the R_LARCH_PCREL20_S2 relocation type

`R_LARCH_PCREL20_S2` is a new added relocation type in LoongArch ELF
psABI v2.10 [1] which is not corvered by D138135 except `R_LARCH_64_PCREL`.

A motivation to support `R_LARCH_PCREL20_S2` in lld is to build the
runtime of .NET core (a.k.a `CoreCLR`) in which strict PC-relative
semantics need to be guaranteed [2]. The normal `pcalau12i + addi.d`
approach doesn't work because the code will be copied to other places
with different "page" and offsets. To achieve this, we can use `pcaddi`
with explicit `R_LARCH_PCREL20_S2` reloc to address +-2MB PC-relative
range with 4-bytes aligned.

[1]: https://github.com/loongson/la-abi-specs/releases/tag/v2.10
[2]: https://github.com/dotnet/runtime/blob/release/7.0/src/coreclr/vm/loongarch64/asmhelpers.S#L307

Reviewed By: xen0n, MaskRay

Differential Revision: https://reviews.llvm.org/D156772

(cherry picked from commit 8a31f7ddb8436fa2a8ad754eb51618139cf63415)


  Commit: 82343aa9cf9c164bb2597d2f7b042cb10ec9928e
      https://github.com/llvm/llvm-project/commit/82343aa9cf9c164bb2597d2f7b042cb10ec9928e
  Author: Corentin Jabot <corentinjabot at gmail.com>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticLexKinds.td
    M clang/lib/Lex/LiteralSupport.cpp
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/test/CXX/dcl.dcl/dcl.link/p2.cpp
    M clang/test/CXX/dcl.dcl/p4-0x.cpp
    A clang/test/FixIt/unevaluated-strings.cpp
    M clang/test/Sema/static-assert.c
    M clang/test/SemaCXX/static-assert.cpp

  Log Message:
  -----------
  [Clang] Backport static_assert messages fixes

* 4d494e7: Handle static_assert messages with an expression started by a literal
* 49e0495 Produce a warning instead of an error in unevaluated strings before C++26

Emiting an error on unexpected encoding prefix - which was allowed before C++26 -
caused build errors for a few users.
This downgrade the error to a warning on older language modes and C


  Commit: 13be923dfb738bc41f6a3b03b030f05903fcf46a
      https://github.com/llvm/llvm-project/commit/13be923dfb738bc41f6a3b03b030f05903fcf46a
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/Gnu.cpp
    A clang/test/Driver/Inputs/solaris_sparc32_tree/usr/gcc/10/lib/gcc/sparcv9-sun-solaris2.11/10.4.0/32/crtbegin.o
    A clang/test/Driver/Inputs/solaris_sparc32_tree/usr/gcc/10/lib/gcc/sparcv9-sun-solaris2.11/10.4.0/crtbegin.o
    A clang/test/Driver/Inputs/solaris_sparcv8+_tree/usr/gcc/11/lib/gcc/sparcv9-sun-solaris2.11/11.3.0/crtbegin.o
    A clang/test/Driver/Inputs/solaris_sparcv8+_tree/usr/gcc/11/lib/gcc/sparcv9-sun-solaris2.11/11.3.0/sparcv8plus/crtbegin.o
    M clang/test/Driver/lit.local.cfg
    A clang/test/Driver/solaris-sparc-gcc-search.test

  Log Message:
  -----------
  [Driver] Allow for sparcv8plus subdir with Solaris/SPARC GCC

Since GCC 11, the bundled Solaris/SPARC GCC uses the `sparcv8plus`
subdirectory for 32-bit objects, just like upstream GCC.  Before that, it
used `32` instead from a local patch.

Since `clang` doesn't know about that `sparcv8plus` subdirectory, it
wouldn't properly use GCC 11+ installations.

The new `solaris-sparc-gcc-search.test` testcase wasn't run initially (like
the existing `crash-report-null.test`) because the `.test` suffix wasn't
handled.

Tested on `sparcv9-sun-solaris2.11`, `amd64-pc-solaris2.11`, and
`x86_64-pc-linux-gnu`.

Differential Revision: https://reviews.llvm.org/D157013

(cherry picked from commit 43dfe0f08ecaf50f986512d0548bd3ac84d1813b)


  Commit: 8f4dd44097c9ae25dd203d5ac87f3b48f854bba8
      https://github.com/llvm/llvm-project/commit/8f4dd44097c9ae25dd203d5ac87f3b48f854bba8
  Author: wangpc <wangpengcheng.pp at bytedance.com>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M clang/include/clang/Basic/riscv_vector.td

  Log Message:
  -----------
  [RISCV] Fix wrong type prototype of RVVSlideOneBuiltinSet

We need unsigned integer here.

Fixes #64534

Reviewed By: eopXD

Differential Revision: https://reviews.llvm.org/D157476

(cherry picked from commit 5a3753f35632f8fd7920c5c99b1237113b5c435e)


Compare: https://github.com/llvm/llvm-project/compare/4bf07e1365e1...8f4dd44097c9


More information about the All-commits mailing list