Changes

Summary

  1. [Attributes] Clean up handling of UB implying attributes (NFC) (details)
  2. [X86][SSE] LowerRotate - perform modulo on the amount splat source directly. (details)
  3. [OpenMP][tests][NFC] Update test status for gcc 11 and 12 (details)
  4. [AArch64] Fix Local Deallocation for Homogeneous Prolog/Epilog (details)
  5. [NFC][Codegen][X86] Improve test coverage for insertions into XMM vector (details)
  6. [OpenMP] Introduce RAII to protect certain RTL calls from DCE (details)
  7. [libomptarget] Build amdgpu plugin without hsa (details)
  8. [X86][AVX] Add getBROADCAST_LOAD helper function. NFCI. (details)
  9. [LangRef] Reorder two paragraphs for comdat (details)
  10. Revert "[libomptarget] Build amdgpu plugin without hsa" (details)
  11. Revert "[VPlan] Add recipe for first-order rec phis, make splicing explicit." (details)
  12. [docs] Update release notes to mention lli JIT engine switch (details)
  13. [lld/mac] Add tests for the interaction between -rename_section and -rename_segment (details)
  14. Revert "[lld/mac] Add tests for the interaction between -rename_section and -rename_segment" (details)
  15. [libomptarget][amdgpu] More robust handling of failure to init HSA (details)
  16. [lld/mac] Reland: Add tests for the interaction between -rename_section and -rename_segment (details)
  17. [lld/mac] Move output segment rename logic into OutputSegment (details)
  18. [lld/mac] Add support for segment$start$ and segment$end$ symbols (details)
  19. [lld/mac] Make comment style uniform in start-end.s test (details)
Commit 087a8eea359a4d8ef22c42fddca3b09833928c6a by nikita.ppv
[Attributes] Clean up handling of UB implying attributes (NFC)

Rather than adding methods for dropping these attributes in
various places, add a function that returns an AttrBuilder with
these attributes, which can then be used with existing methods
for dropping attributes. This is with an eye on D104641, which
also needs to drop them from returns, not just parameters.

Also be more explicit about the semantics of the method in the
documentation. Refer to UB rather than Undef, which is what this
is actually about.
The file was modifiedllvm/lib/Transforms/IPO/DeadArgumentElimination.cpp (diff)
The file was modifiedllvm/include/llvm/IR/InstrTypes.h (diff)
The file was modifiedllvm/include/llvm/IR/Attributes.h (diff)
The file was modifiedllvm/lib/IR/Function.cpp (diff)
The file was modifiedllvm/lib/IR/Attributes.cpp (diff)
Commit b95f66ad786b8f2814d4ef4373e8ac3902e6f62a by llvm-dev
[X86][SSE] LowerRotate - perform modulo on the amount splat source directly.

If the rotation amount is a known splat, perform the modulo on the splat source, and then perform the splat. That way the amount-extension performed later by LowerScalarVariableShift can fold the splats away without any multiple-use issues.

Fixes one of the concerns raised on D104156
The file was modifiedllvm/test/CodeGen/X86/vector-fshl-rot-sub128.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/vector-fshl-256.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/min-legal-vector-width.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/vector-fshl-rot-256.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/vector-fshl-rot-128.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/vector-rotate-128.ll (diff)
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/X86/vector-fshr-rot-sub128.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/vector-rotate-256.ll (diff)
Commit c46ccb8538c5c0b4724a842e110ad46d7e1b107a by protze
[OpenMP][tests][NFC] Update test status for gcc 11 and 12

gcc 11 introduced support for depend clause, but the gomp interface of libomp
does not yet handle the information.
Also remove -fopenmp-version=50, which is no longer needed for clang, but not
supported by gcc.
The file was modifiedopenmp/runtime/test/ompt/tasks/taskwait-depend.c (diff)
The file was modifiedopenmp/runtime/test/ompt/tasks/task_late_fulfill.c (diff)
The file was modifiedopenmp/tools/archer/tests/task/task_early_fulfill.c (diff)
The file was modifiedopenmp/runtime/test/ompt/tasks/task_early_fulfill.c (diff)
The file was modifiedopenmp/tools/archer/tests/task/task_late_fulfill.c (diff)
The file was modifiedopenmp/runtime/test/tasking/omp_detach_taskwait.c (diff)
Commit 6530ea409506a5778bb773615725b9ddee0538f0 by kyulee
[AArch64] Fix Local Deallocation for Homogeneous Prolog/Epilog

The stack adjustment for local deallocation was incorrectly ported.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D106760
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog.ll (diff)
Commit 9ebd0dbf0f69f2b2ccc71c13d698748afd0ab626 by lebedev.ri
[NFC][Codegen][X86] Improve test coverage for insertions into XMM vector
The file was modifiedllvm/test/CodeGen/X86/avx-insertelt.ll (diff)
The file was addedllvm/test/CodeGen/X86/sse-insertelt.ll
The file was addedllvm/test/CodeGen/X86/sse-insertelt-from-mem.ll
Commit 58725c12bb2746a3f82b4aafc84ff9284e4a991e by huberjn
[OpenMP] Introduce RAII to protect certain RTL calls from DCE

This patch introduces a new RAII struct that will temporarily make an OpenMP
RTL function have external linkage. This is done before the attributor is
invoked to prevent it from incorrectly removing some function definitions that
we will use later. For example, if we determine all calls to one function are
dead, because it has internal linkage it can safely be removed. Later when we
try to get an instance to that function to modify the source using
`getOrCreateRuntimeFunction` we will then get an empty declaration for that
function that won't be defined anywhere. This patch prevents this from
occurring.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D106707
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp (diff)
Commit e30b3b23a4eddbc08b5648e643f0a0b456a57832 by jonathanchesterfield
[libomptarget] Build amdgpu plugin without hsa

Default to building the amdgpu plugin to use dlopen when hsa is
not found instead of disabling it.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D106600
The file was modifiedopenmp/libomptarget/plugins/amdgpu/CMakeLists.txt (diff)
Commit 1cfecf4fc4278afb0005923f6dff595cd372da5c by llvm-dev
[X86][AVX] Add getBROADCAST_LOAD helper function. NFCI.

Begin replacing individual getMemIntrinsicNode calls and setup (for X86ISD::VBROADCAST_LOAD + X86ISD::SUBV_BROADCAST_LOAD opcodes) with this getBROADCAST_LOAD helper.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp (diff)
Commit a45bcde05f0911d943c5ee5d6ef1327a0cc39dbc by i
[LangRef] Reorder two paragraphs for comdat

so that IMAGE_COMDAT_SELECT_LARGEST refers to the correct example.
The file was modifiedllvm/docs/LangRef.rst (diff)
Commit e3251f2ec44bd65f440d215517f135c39f22d1b9 by jonathanchesterfield
Revert "[libomptarget] Build amdgpu plugin without hsa"

Inaccurate error handling around hsa_init

This reverts commit e30b3b23a4eddbc08b5648e643f0a0b456a57832.
The file was modifiedopenmp/libomptarget/plugins/amdgpu/CMakeLists.txt (diff)
Commit b1777b04dc4b1a9fee0e7effa7e177892ab32ef0 by thakis
Revert "[VPlan] Add recipe for first-order rec phis, make splicing explicit."

Makes clang crash: https://reviews.llvm.org/D105008#2903350
This reverts commit d2a73fb44ea0b8c981e4b923f811f18793fc4770.

Also revert a minor formatting follow-up:
This reverts commit 82834a673246f27a541ffcc57e0eb65b008102ef.
The file was modifiedllvm/test/Transforms/LoopVectorize/first-order-recurrence-complex.ll (diff)
The file was modifiedllvm/lib/Transforms/Vectorize/VPlanTransforms.cpp (diff)
The file was modifiedllvm/test/Transforms/LoopVectorize/induction.ll (diff)
The file was modifiedllvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll (diff)
The file was modifiedllvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll (diff)
The file was modifiedllvm/lib/Transforms/Vectorize/VPlanValue.h (diff)
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp (diff)
The file was modifiedllvm/test/Transforms/LoopVectorize/scalable-first-order-recurrence.ll (diff)
The file was modifiedllvm/test/Transforms/LoopVectorize/interleaved-accesses.ll (diff)
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.h (diff)
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp (diff)
The file was modifiedllvm/test/Transforms/LoopVectorize/first-order-recurrence.ll (diff)
Commit e814b28eeb30d07a78ed6a99f3aad9f56ae47999 by Stefan Gränitz
[docs] Update release notes to mention lli JIT engine switch
The file was modifiedllvm/docs/ReleaseNotes.rst (diff)
Commit a6eb34624dcfa5a33caa0211f4a16710b22079c2 by thakis
[lld/mac] Add tests for the interaction between -rename_section and -rename_segment

No behavior change.

Differential Revision: https://reviews.llvm.org/D106765
The file was modifiedlld/test/MachO/rename.s (diff)
Commit 14bb6e4d709cd5aa70637b389c919ceed6cd83a5 by thakis
Revert "[lld/mac] Add tests for the interaction between -rename_section and -rename_segment"

This reverts commit a6eb34624dcfa5a33caa0211f4a16710b22079c2.
The test fails, I screwed something up.
The file was modifiedlld/test/MachO/rename.s (diff)
Commit dd0b463dd9ed4901a2e8fec498931bdf94a3f656 by jonathanchesterfield
[libomptarget][amdgpu] More robust handling of failure to init HSA

If hsa_init fails, subsequent calls into hsa are not safe. Except for
hsa_init, but we don't retry on failure.

This patch:
- deletes a print that called into hsa to ask why it can't call into hsa
- drops a merge conflict block next to that print
- reliably initializes number of devices to zero
- skips the plugin destructor contents if the constructor failed to init hsa

Tested by making hsa_init return error, and by forcing the dynamic library
use which was then deleted from disk. Before this patch, both segv. After it,
friendly message about offloading being unavailable.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D106774
The file was modifiedopenmp/libomptarget/plugins/amdgpu/impl/system.cpp (diff)
The file was modifiedopenmp/libomptarget/plugins/amdgpu/src/rtl.cpp (diff)
Commit 6bf7d2d9c92e4f5834556532b3a22f6a878eb8de by thakis
[lld/mac] Reland: Add tests for the interaction between -rename_section and -rename_segment

No behavior change.

Differential Revision: https://reviews.llvm.org/D106765
The file was modifiedlld/test/MachO/rename.s (diff)
Commit afdeb432f0a1e10257862e4a047fc32458f4c124 by thakis
[lld/mac] Move output segment rename logic into OutputSegment

Fixes the output segment name if both -rename_section and
-rename_segment are used and the post-section-rename segment
name is the same as the pre-segment-rename segment name to
match ld64's behavior.

The motivation is that segment$start$ can create section-less segments,
and this makes a corner case in the interaction between segment$start and
-rename_segment in the upcoming segment$start patch.

Differential Revision: https://reviews.llvm.org/D106766
The file was modifiedlld/MachO/ConcatOutputSection.cpp (diff)
The file was modifiedlld/test/MachO/rename.s (diff)
The file was modifiedlld/MachO/OutputSegment.cpp (diff)
Commit 80caa1eb4a0eab61debdcda515d00461a20520a6 by thakis
[lld/mac] Add support for segment$start$ and segment$end$ symbols

These symbols are somewhat interesting in that they create non-existing
segments, which as far as I know is the only way to create segments
that don't contain any sections.

Final part of part of PR50760. Like D106629, but for segments instead
of sections. I'm not aware of anything that needs this in practice.

Differential Revision: https://reviews.llvm.org/D106767
The file was modifiedlld/MachO/OutputSegment.cpp (diff)
The file was modifiedlld/MachO/SymbolTable.cpp (diff)
The file was modifiedlld/MachO/OutputSegment.h (diff)
The file was modifiedlld/test/MachO/start-end.s (diff)
The file was modifiedlld/MachO/Writer.cpp (diff)
Commit 75e7d1320cae410eadd27b7014768721a88818a1 by thakis
[lld/mac] Make comment style uniform in start-end.s test
The file was modifiedlld/test/MachO/start-end.s (diff)