Reapply [Offload][lit] Link against SPIR-V DeviceRTL if present (#180231)
I'll merge this at the same time as some llvm-zorg changes that start
building the DeviceRTL.
We only see one new test passing because everything still fails because
of the issue described in
https://github.com/llvm/llvm-project/pull/178980
Once a fix for that issue is merged we will see many new passes.
[RISCV] Combine ADDD+WMULSU to WMACCSU (#180454)
Extend the existing combineADDDToWMACC DAG combine to also match
RISCVISD::WMULSU and produce RISCVISD::WMACCSU. This is similar to
how ADDD+UMUL_LOHI is combined to WMACCU and ADDD+SMUL_LOHI is
combined to WMACC.
This patch was generated by AI, but I reviewed it.
sctp: Use __sdt_used for variables only used by SDT probes
Previously this used a home-rolled version.
Reviewed by: tuexen, imp, markj
Differential Revision: https://reviews.freebsd.org/D55165
sdhci_fdt_rockchip: Don't return 0 from probe routine
The only write to the softc is a no-op (softcs are initialized to all
zeroes), so remove that and just use BUS_PROBE_DEFAULT.
Reviewed by: bnovkov
Differential Revision: https://reviews.freebsd.org/D55159
sdhci_fdt_rockchip: Move ofw_bus_status_okay check
This fixes a warning from GCC:
sys/dev/sdhci/sdhci_fdt_rockchip.c: In function 'sdhci_fdt_rockchip_probe':
sys/dev/sdhci/sdhci_fdt_rockchip.c:120:14: error: statement will never be executed [-Werror=switch-unreachable]
120 | if (!ofw_bus_status_okay(dev))
| ^~~~~~~~~~~~~~~~~~~~~~~~
Reviewed by: bnovkov, imp, emaste
Differential Revision: https://reviews.freebsd.org/D55158
llvm: Link private LLVM libraries against compiler_rt for aarch64
This is required for GCC which uses libcalls for outlined atomics.
Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D55157
libmd aarch64: Use ands instead of bics to round down the length
GNU as does not accept bics with two register operands but instead
requires three register operands. However, clang assembles the bics
instruction to ands anyway, so just use ands directly.
Reviewed by: fuz
Differential Revision: https://reviews.freebsd.org/D55155
[X86] Fold expand(splat,passthrough,mask) -> select(splat,passthrough,mask) (#180238)
If all elements of the expansion vector are already splatted in place then we can use a vselect directly
AMDGPU: Libcall expand fast pow/powr/pown/rootn for float case
This is to eliminate the special case global unsafe math options
in these functions from the library. The core operation only
uses about 4 instructions, and then there's an additional prolog
and/or epilog to fixup special cases.
I have an alternative patch which implements this by using separate
entrypoints in the library, and having the pass replace the calls
instead of this full handling. However, given the unfortunate state
of library development, it requires a full year to make cross project
changes. This is the most expedient path to deleting the control library;
in the future we can do libcall emission when compiler has the real
ability to properly emit new calls.
This is mostly a direct port of these functions:
https://github.com/ROCm/llvm-project/blob/amd-staging/amd/device-libs/ocml/src/powF_base.h
I used copilot to do the heavy lifting on the drudgery of writing out
[22 lines not shown]
[InstCombine] Support minimumnum/maximumnum (#180529)
Support minimumnum/maximumnum intrinsics in various existing
minnum/maxnum/minimum/maximum folds.
The test coverage has been copied from minnum/maxnum.
Proofs: https://alive2.llvm.org/ce/z/YMlLwO
Proofs that time out: https://alive2.llvm.org/ce/z/dJN8wj
aw_mmc: Reset card
On H616 (and I think H6, but this isn't verified) we need to reset the
card to have a functioning device.
With this commit all my pending patches for H616 are in tree. We run
well on my test device (Orange Pi Zero3), however there is an
uninvestigated issue with ethernet and graphics are an open question.
Reviewed by: manu, adrian
MFC After: 1 week
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55097
[SPIR-V] initial support for @llvm.structured.gep (#178668)
This commit adds initial support to lower the intrinsinc
`@llvm.structured.gep` into proper SPIR-V.
For now, the backend continues to support both GEP formats. We might
want to revisit this at some point for the logical part.
CONTRIBUTING.md: Clarify GitHub pull requests
Make the guidelines more prescriptive (while remaining clear that Pull
Requests are merely one, not-preferred method for submitting changes).
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55089
[AMDGPU] Add legalization rules for G_ATOMICRMW_FADD (#175257)
G_ATOMICRMW_FADD is supported on flat, global and local address spaces
for S32, S64 and V2S16 values.
Reland "[LoopVectorize] Support vectorization of overflow intrinsics" (#180526)
Enables support for marking overflow intrinsics `uadd`, `sadd`, `usub`,
`ssub`, `umul` and `smul` as trivially vectorizable.
Fixes #174617
---
This patch is a reland of #174835.
Reverts #179819
[llvm][DebugInfo] Avoid attaching retained nodes to unrelated subprograms in DIBuilder (#180294)
Fix a regression introduced by
https://github.com/llvm/llvm-project/pull/165032, where DIBuilder could
attach local metadata nodes to the wrong subprogram during finalization.
DIBuilder records freshly created local variables, labels, and types in
`DIBuilder::SubprogramTrackedNodes`, and later attaches them to their
parent subprogram's retainedNodes in `finalizeSubprogram()`.
However, a temporary local type created via
`createReplaceableCompositeType()` may later be replaced by a type with
a different scope.
DIBuilder does not currently verify that the scopes of the original and
replacement types match.
As a result, local types can be incorrectly attached to the
retainedNodes of an unrelated subprogram. This issue is observable in
clang with limited debug info mode (see
[5 lines not shown]