SuccessChanges

Summary

  1. Add @llvm.coro.async.size.replace intrinsic. (details)
  2. [AMDGPU] Rename a prefix for sanity. NFC. (details)
  3. [JumpThreading] Update computeValueKnownInPredecessors to recognize logical and/or patterns (details)
  4. [AMDGPU][SelectionDAG] Don't combine uniform multiplies to MUL_[UI]24 (details)
  5. [LV] Allow tryToCreateWidenRecipe to return a VPValue, use for blends. (details)
  6. Revert "[LV] Allow tryToCreateWidenRecipe to return a VPValue, use for blends." (details)
  7. [lldb] Add deref support and tests to shared_ptr synthetic (details)
  8. [GlobalISel] Make more use of replaceSingleDefInstWithReg. NFC. (details)
  9. [darwin][asan] add test for application specific information in crash logs (details)
  10. [darwin] use new crash reporter api (details)
  11. [THUMB2] add .w suffixes for ldr/str (immediate) T4 (details)
Commit 01b4890e47f0988695e68ea4e1fd6961b645ee73 by aschwaighofer
Add @llvm.coro.async.size.replace intrinsic.

The new intrinsic replaces the size in one specified AsyncFunctionPointer with
the size in another.  This ability is necessary for functions which merely
forward to async functions such as those defined for partial applications.

Reviewed By: aschwaighofer

Differential Revision: https://reviews.llvm.org/D97229
The file was modifiedllvm/lib/Transforms/Coroutines/CoroCleanup.cpp
The file was modifiedllvm/lib/Transforms/Coroutines/CoroInstr.h
The file was modifiedllvm/lib/Transforms/Coroutines/Coroutines.cpp
The file was modifiedllvm/include/llvm/IR/Intrinsics.td
The file was modifiedllvm/test/Transforms/Coroutines/coro-async.ll
Commit 64831fb0896f7be507fb73618ad8d2c086b7721d by jay.foad
[AMDGPU] Rename a prefix for sanity. NFC.
The file was modifiedllvm/test/MC/AMDGPU/sopp-err.s
Commit 19c2e129475013a8a36696d475c9d8681ce52614 by aqjune
[JumpThreading] Update computeValueKnownInPredecessors to recognize logical and/or patterns

This allows JumpThreading's computeValueKnownInPredecessors to
recognize select form of and/or patterns as well.
The file was modifiedllvm/include/llvm/IR/PatternMatch.h
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
Commit 52bc2e7577f338704438e18c95dea756657eca21 by jay.foad
[AMDGPU][SelectionDAG] Don't combine uniform multiplies to MUL_[UI]24

Prefer to keep uniform (non-divergent) multiplies on the scalar ALU when
possible. This significantly improves some game cases by eliminating
v_readfirstlane instructions when the result feeds into a scalar
operation, like the address calculation for a scalar load or store.

Since isDivergent is only an approximation of whether a value is in
SGPRs, it can potentially regress some situations where a uniform value
ends up in a VGPR. These should be rare in real code, although the test
changes do contain a number of examples.

Most of the test changes are just using s_mul instead of v_mul/mad which
is generally better for both register pressure and latency (at least on
GFX10 where sgpr pressure doesn't affect occupancy and vector ALU
instructions have significantly longer latency than scalar ALU). Some
R600 tests now use MULLO_INT instead of MUL_UINT24.

GlobalISel appears to handle more scenarios in the desirable way,
although it can also be thrown off and fails to select the 24-bit
multiplies in some cases.

Alternative solution considered and rejected was to allow selecting
MUL_[UI]24 to S_MUL_I32. I've rejected this because the definition of
those SD operations works is don't-care on the most significant 8 bits,
and this fact is used in some combines via SimplifyDemandedBits.

Based on a patch by Nicolai Hähnle.

Differential Revision: https://reviews.llvm.org/D97063
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_optimizations_pixelshader.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/mad24-get-global-id.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/mul_uint24-amdgcn.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_optimizations_raw_buffer.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/mul_uint24-r600.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/trunc-combine.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.r600.read.local.size.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/mul_int24.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_optimizations_global_pointer.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_optimizations_local_pointer.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.sendmsg.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_optimizations_buffer.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/mad_int24.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/srem.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/mad_uint24.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/mul.i16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_optimizations_struct_buffer.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/frame-index-elimination.ll
Commit 4efa097eb4c87d7ffe09a95a5b4ff372bdddda85 by flo
[LV] Allow tryToCreateWidenRecipe to return a VPValue, use for blends.

Generalize the return value of tryToCreateWidenRecipe to return either a
newly create recipe or an existing VPValue. Use this to avoid creating
unnecessary VPBlendRecipes.

Fixes PR44800.
The file was modifiedllvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
The file was modifiedllvm/test/Transforms/LoopVectorize/single-value-blend-phis.ll
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Commit 437f0bbcd509d0ed71b91ec1f86f48c2f4aae980 by flo
Revert "[LV] Allow tryToCreateWidenRecipe to return a VPValue, use for blends."

This reverts commit 4efa097eb4c87d7ffe09a95a5b4ff372bdddda85, because
some the compilers used for some bots do not support automatic
conversions to PointerUnion.
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/single-value-blend-phis.ll
The file was modifiedllvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
Commit 0ac42fd26d738b2d7b2811fc995bd7cacf994144 by davelee.com
[lldb] Add deref support and tests to shared_ptr synthetic

Add `frame variable` dereference suppport to libc++ `std::shared_ptr`.

This change allows for commands like `v *thing_sp` and `v thing_sp->m_id`. These
commands now work the same way they do with raw pointers. This is done by adding an
unaccounted for child member named `$$dereference$$`.

Also, add API tests for `std::shared_ptr`, previously there were none.

Differential Revision: https://reviews.llvm.org/D97165
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/LibCxx.h
The file was addedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/main.cpp
The file was addedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py
The file was addedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/Makefile
Commit a6be26710bbdf8de39a16ad64526ec955dda6c59 by jay.foad
[GlobalISel] Make more use of replaceSingleDefInstWithReg. NFC.
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Commit b6099fa515b1c0bb80d2347a836c01c65d7bc253 by Dan Liew
[darwin][asan] add test for application specific information in crash logs

Added a lit test that finds its corresponding crash log and checks to make sure it has asn output under `Application Specific Information`.

This required adding two python commands:
- `get_pid_from_output`: takes the output from the asan instrumentation and parses out the process ID
- `print_crashreport_for_pid`: takes in the pid of the process and the file name of the binary that was run and prints the contents of the corresponding crash log.

This test was added in preparation for changing the integration with crash reporter from the old api to the new api, which is implemented in a subsequent commit.

rdar://69767688

Reviewed By: delcypher

Commited by Dan Liew on behalf of Emily Shi.

Differential Revision: https://reviews.llvm.org/D96737
The file was addedcompiler-rt/test/sanitizer_common/ios_commands/get_pid_from_output.py
The file was modifiedcompiler-rt/test/lit.common.cfg.py
The file was addedcompiler-rt/test/asan/TestCases/Darwin/asan_log_to_crashreporter.cpp
The file was addedcompiler-rt/test/sanitizer_common/ios_commands/print_crashreport_for_pid.py
Commit 956c90d347be82a93b16c685c25d016018ed99bf by Dan Liew
[darwin] use new crash reporter api

Add support for the new crash reporter api if the headers are available. Falls back to the old API if they are not available. This change was based on [[ https://github.com/llvm/llvm-project/blob/0164d546d2691c439fc06c8fff126224276c2d02/llvm/lib/Support/PrettyStackTrace.cpp#L111 | /llvm/lib/Support/PrettyStackTrace.cpp ]]

There is a lit for this behavior here: https://reviews.llvm.org/D96737 but is not included in this diff because it is potentially flaky.

rdar://69767688

Reviewed By: delcypher, yln

Commited by Dan Liew on behalf of Emily Shi.

Differential Revision: https://reviews.llvm.org/D96830
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_mac.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
Commit 1e204ac78952cf7e4fcf335423e80007388d3979 by ndesaulniers
[THUMB2] add .w suffixes for ldr/str (immediate) T4

The Linux kernel when built with CONFIG_THUMB2_KERNEL makes use of these
instructions with immediate operands and wide encodings.

These are the T4 variants of the follow sections from the Arm ARM.
F5.1.72 LDR (immediate)
F5.1.229 STR (immediate)

I wasn't able to represent these simple aliases using t2InstAlias due to
the Constraints on the non-suffixed existing instructions, which results
in some manual parsing logic needing to be added.

F1.2 Standard assembler syntax fields
describes the use of the .w (wide) vs .n (narrow) encoding suffix.

Link: https://bugs.llvm.org/show_bug.cgi?id=49118
Link: https://github.com/ClangBuiltLinux/linux/issues/1296
Reported-by: Stefan Agner <stefan@agner.ch>
Reported-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Reviewed By: DavidSpickett

Differential Revision: https://reviews.llvm.org/D96632
The file was addedllvm/test/MC/ARM/thumb2-ldr.w-str.w.s
The file was modifiedllvm/lib/Target/ARM/ARMInstrThumb2.td
The file was modifiedllvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp