InstCombine: Handle fsub in SimplifyDemandedFPClass (#175852)
alive2 fails on some of the tests, but this is due to existing
folds in instsimplify and
https://github.com/AliveToolkit/alive2/issues/1273
InstCombine: Fold known-qnan results to a literal nan
Previously we only considered fcNan to fold to qnan for canonicalizing
results, ignoring the simpler case where we know the nan is already
quiet.
AMDGPU: Disable scheduler mfma rewrite stage by default for now (#177624)
Currently generating an excess number of copies. Turning it off to avoid
churn for other developers.
[libc++] Automatically detect the libc++ hardening mode from the test suite (#172505)
This prevents hardcoding the hardening mode via compiler flags, and
allows testing what the default hardening mode is on platforms that set
it to something that isn't `none`. Otherwise, a platform setting a
default (which is done via -DLIBCXX_HARDENING_MODE=mode at CMake
configuration time) would end up passing `-D_LIBCPP_HARDENING_MODE=mode`
to the compiler, which does not allow checking what the default mode is.
[LV] capture branch weights for constant trip counts (#175096)
When a vectorized loop has constant trip, it's important to update the
profile information accordingly. Hotness analysis will only look at
profile info.
For example, in the `tripcount.ll` test, without producing the profile
info, in the `const_trip_over_profile` function, the BFI of the
`vector.body` would be 32 (this is the expected value when synthetic
branch weights are used, in loops). The real value is 250. The
`for.body`value was _very_ incorrect before, too (and detrimentally so,
as it would have appeared as "very hot" when it wasn't):
The table below was obtained by printing BFI in the RUN: command, i.e.
`build/bin/opt < llvm/test/Transforms/LoopVectorize/tripcount.ll
-passes="loop-vectorize,print<block-freq>"
-loop-vectorize-with-block-frequency -S -o /dev/null`. Showing only the
`float` value, i.e. the BFI relative to the function entry BB.
[15 lines not shown]
[libc++][NFC] Simplify some `optional.observe` tests (#175682)
- Collapse the different ref/const-qualifier `operator*`, `operator->`
and `value()` tests since they were all very similar to each other
- Refactor them to be inline with the current testing style
[lldb] Fix setting CanJIT if memory cannot be allocated (#176099)
When a server is unable to allocate memory for the `_M` packet, it may
respond with an error code. In this case,
`GDBRemoteCommunicationClient::AllocateMemory()` sets
`m_supports_alloc_dealloc_memory` to `eLazyBoolYes`; `eLazyBoolNo` is
only used if the server cannot handle the packet at all. Before this
patch, `ProcessGDBRemote::DoAllocateMemory()` checked this flag and
returned `LLDB_INVALID_ADDRESS` without setting an error, which caused
`Process::CanJIT()` to set `m_can_jit = eCanJITYes`, resulting in
`IRMemoryMap::FindSpace()` attempting to allocate memory in the inferior
process and failing. With the patch,
`ProcessGDBRemote::DoAllocateMemory()` returns an error and `m_can_jit`
is set to `eCanJITNo`.
Example debug session:
```
(lldb) platform connect...
(lldb) file test
[8 lines not shown]
[CIR] Upstream support for null and virtual method pointers (#176522)
This upstreams support for pointer-to-member value representations of
null and virtual member pointers and the lowering of virtual member
pointers.