SuccessChanges

Summary

  1. [AMDGPU] add v2i32 and v2f32 insert_vector_elt tests. NFC. (details)
  2. [Thumb2] generate checks in ldr-str-imm12.ll. NFC. (details)
  3. [AArch64][GlobalISel] Widen G_BSWAP before clamping (details)
  4. [AIX] "aligned" attribute should not decrease type alignment returned by __alignof__ (details)
  5. [AArch64] Expand the SVE min/max reduction costs to NEON (details)
  6. [WebAssembly] Don't do SjLj transformation when there's only setjmp (details)
  7. [PowerPC] Add scalar vector test (details)
  8. [PowerPC] Remove accidently left checks (details)
  9. [AMDGPU] Improve v2i32/v2f32 insertelt patterns (details)
  10. [AArch64][GlobalISel] Widen extloads before clamping during legalization (details)
  11. Mark getc_unlocked as unavailable by default (details)
  12. [LLDB][GUI] Refactor form drawing using subsurfaces (details)
  13. [llvm-profgen] Fix bug of loop scope mismatch (details)
  14. [GlobalISel][KnownBits] Implement G_CTPOP (details)
  15. [GlobalISel] Allow the ArtifactValueFinder to return the best available register on failure. (details)
  16. Revert "[GlobalISel][KnownBits] Implement G_CTPOP" (details)
Commit 42b9c2a17a0b63cccf3ac197a82f91b28e53e643 by Stanislav.Mekhanoshin
[AMDGPU] add v2i32 and v2f32 insert_vector_elt tests. NFC.
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.ll
Commit c46cb72fea73467dbd72050a9e250080d5757e89 by Stanislav.Mekhanoshin
[Thumb2] generate checks in ldr-str-imm12.ll. NFC.

That seems this test does not check what was stated in the
comment anymore. Just switch to generated checks.

Differential Revision: https://reviews.llvm.org/D107590
The file was modifiedllvm/test/CodeGen/Thumb2/ldr-str-imm12.ll
Commit 36498374d471272ab094b622dbc55874d8713a8f by Jessica Paquette
[AArch64][GlobalISel] Widen G_BSWAP before clamping

This allows us to avoid odd type breakdowns + allows us to legalize types like
s88 in the first place.

Add some testcases for known legal types + testcases for s4 and s88.

Differential Revision: https://reviews.llvm.org/D107607
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-bswap.mir
Commit a91916500d67155ca17bfdf3294541f871f90a45 by wanyu9511
[AIX] "aligned" attribute should not decrease type alignment returned by __alignof__

`__alignof__(x)` always returns `ABIAlign` if the "x" is marked `__attribute__((aligned()))`. However, the "aligned" attribute should only increase the alignment of a struct, or struct member, unless it's used together with the "packed" attribute, or used as a part of a typedef, in which case, the "aligned" attribute can both increase and decrease alignment.

Reviewed By: sfertile

Differential Revision: https://reviews.llvm.org/D107598
The file was addedclang/test/Layout/aix-alignof-align-and-pack-attr.cpp
The file was modifiedclang/lib/AST/ASTContext.cpp
Commit 649cf4514dd32e0e7944f6f8d82a1b72c87a2870 by david.green
[AArch64] Expand the SVE min/max reduction costs to NEON

This takes the existing SVE costing for the various min/max reduction
intrinsics and expands it to NEON, where I believe it applies equally
well.

In the process it changes the lowering to use min/max cost, as opposed
to summing up the cost of ICmp+Select.

Differential Revision: https://reviews.llvm.org/D106239
The file was modifiedllvm/test/Analysis/CostModel/AArch64/reduce-minmax.ll
The file was modifiedllvm/test/Analysis/CostModel/AArch64/vector-reduce.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
Commit 41ba39dfcd0a765f238561ce1b52f843c825ff9a by aheejin
[WebAssembly] Don't do SjLj transformation when there's only setjmp

When there is a `setjmp` call in a function, we transform every callsite
of `setjmp` to record its information by calling `saveSetjmp` function,
and we also transform every callsite of a function that can longjmp to
to check if a longjmp occurred and if so jump to the corresponding
post-setjmp BB. Currently we are doing this for every function that
contains a call to `setjmp`, but if there is no other function call
within that function that can longjmp, this transformation of `setjmp`
callsite and all the preparation of `setjmpTable` in the entry of the
function are not necessary.

This checks if a setjmp-calling function has any other calls that can
longjmp, and if not, skips the function for the SjLj transformation.

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D107530
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-sjlj-alias.ll
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
Commit 41aaf82911252c7cd4958b16131b7b1bf1f0e39f by Jinsong Ji
[PowerPC] Add scalar vector test
The file was addedllvm/test/CodeGen/PowerPC/scalar_vector_test_5.ll
Commit b4fe4358905d2739283bb04570d60b970869db2b by Jinsong Ji
[PowerPC] Remove accidently left checks
The file was modifiedllvm/test/CodeGen/PowerPC/scalar_vector_test_5.ll
Commit d71924fbfef2efd343388d189309bfb1e38e8021 by Stanislav.Mekhanoshin
[AMDGPU] Improve v2i32/v2f32 insertelt patterns

Using REG_SEQUENCE produces better code than INSERT_SUBREG,
we can omit one move instruction in many cases.

Fixes: SWDEV-298028

Differential Revision: https://reviews.llvm.org/D107602
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIInstructions.td
Commit 8a557d8311593627efd08d03178889971d5ae02b by Jessica Paquette
[AArch64][GlobalISel] Widen extloads before clamping during legalization

Allows us to avoid awkward type breakdowns on types like s88, like the other
commits.

Differential Revision: https://reviews.llvm.org/D107587
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-extload.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
Commit 623cf3dfdf3e202b99e4d0529c37eb7ef2474860 by rprichard
Mark getc_unlocked as unavailable by default

Before D45736, getc_unlocked was available by default, but turned off
for non-Cygwin/non-MinGW Windows. D45736 then added 9 more unlocked
functions, which were unavailable by default, but it also:
* left getc_unlocked enabled by default,
* removed the disabling line for Windows, and
* added code to enable getc_unlocked for GNU, Android, and OSX.

For consistency, make getc_unlocked unavailable by default. Maybe this
was the intent of D45736 anyway.

Reviewed By: MaskRay, efriedma

Differential Revision: https://reviews.llvm.org/D107527
The file was modifiedllvm/lib/Analysis/TargetLibraryInfo.cpp
The file was modifiedllvm/test/Transforms/InferFunctionAttrs/annotate.ll
Commit 2b89f40a411cb9717232df61371b24d73ae84cb8 by gclayton
[LLDB][GUI] Refactor form drawing using subsurfaces

This patch adds a new method SubSurface to the Surface class. The method
returns another surface that is a subset of this surface. This is
important to further abstract away drawing from the ncurses objects. For
instance, fields could previously be drawn on subpads only but can now
be drawn on any surface. This is needed to create the file search
dialogs and similar functionalities.

There is an opportunity to refactor window drawing in general using
surfaces, but we shall consider this separately later.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D107182
The file was modifiedlldb/source/Core/IOHandlerCursesGUI.cpp
Commit a8a38ef3d99ce2b180f9c5ff968e5b930a99b10b by wlei
[llvm-profgen] Fix bug of loop scope mismatch

One performance issue happened in profile generation and it turned out the line 525 loop is the bottleneck.
Moving the code outside of loop scope can fix this issue. The run time is improved from 30+mins to ~30s.

Reviewed By: hoy, wenlei

Differential Revision: https://reviews.llvm.org/D107529
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
Commit ce6eb4f15a159e652bdccf92a9d3da8a972d1596 by jonathan_roelofs
[GlobalISel][KnownBits] Implement G_CTPOP

Implementation copied almost verbatim from ValueTracking.

Differential revision: https://reviews.llvm.org/D107606
The file was modifiedllvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
Commit 1577c41090a0606432688a9a9cd1744cddcccbda by Amara Emerson
[GlobalISel] Allow the ArtifactValueFinder to return the best available register on failure.

In some cases, like with inserts, we may have a matching size register already,
but still decide to try to look further. This change adds a CurrentBest
register to the value finder state, and any time a method fails to make progress,
returns that register (which may just be an empty Register).

To facilitate this, add a new entry point to the findValueFromDef() function
which initializes this state.

Also fix the build vector finder to return the current build_vector if all
sources are being requested.

Differential Revision: https://reviews.llvm.org/D107017
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/bug-legalization-artifact-combiner-dead-def.mir
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-inserts.mir
Commit 5fc7b1a260f2d33a70cf5202ce9f780f1fbf5f2c by jonathan_roelofs
Revert "[GlobalISel][KnownBits] Implement G_CTPOP"

This reverts commit ce6eb4f15a159e652bdccf92a9d3da8a972d1596.

It's broken on the windows bots: https://reviews.llvm.org/D107606#2930121
The file was modifiedllvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp