[LV] Introduce -force-target-supports-gather-scatter-ops testing option (#196947)
This introduces a new force-target-supports-gather-scatter-ops CLI
option for testing. It can be used to show that the lack of
gather/scatter support prevents if-conversion.
[X86] Avoid repeated select masks in avx512 tests (#197886)
Don't reuse the selection masks in unit tests just for expediency -
#197799 will attempt to fold these into single selects
Also remove an ancient test_vbroadcast test that hasn't actually done
anything since we started using mask vpternlog for mask expansion (and
the test now folds away anyhow).
[mlir][tosa] Use traits to check output type aligns with input type (#193961)
Reduces code duplication and ensures the output shape aligns with the
input shape.
[Syntax] Append EOF token to truncated expanded token stream when the parser halts prematurely (#196861)
Fixes #196244.
This PR addresses cases where this assertion is triggered in
`TokenCollector::Builder::build()`:
https://github.com/llvm/llvm-project/blob/dff356d47cfc4413f78c858dd8339cb1c9fca255/clang/lib/Tooling/Syntax/Tokens.cpp#L715
`TokenCollector` collects the expanded token stream by registering a
token watcher callback in the preprocessor. Normally, the preprocessor
calls the callback for every token up to and including the `tok::eof`
token. However, when the parser hits a hard limit such as exceeding the
maximum function scope depth (this is the case covered by #196244) or
exceeding the bracket depth limit, it bails out via
`Parser::cutOffParsing()`. `cutOffParsing` forces the current token to
`eof`, but the token watcher callback is never called for it. The result
is a truncated token stream.
Fix by checking if `ExpandedTokens` is missing the final `tok::eof`. If
[4 lines not shown]
[lldb][windows] add assert frame recognizer Windows (#197282)
This patch implements `AssertFrameRecognizer` on Windows.
Since the Windows C Runtime can be either statically or dynamically
linked, lldb can't match the module name to be able to support both.
Therefore, the matches on `abort` and `_wassert` do not check the name
of the module.
The `assert.test` test was also relaxed to check the Windows error
format (`Exception 0xc0000409`), since Windows surfaces `__fastfail` as
a `STATUS_STACK_BUFFER_OVERRUN` exception rather than a POSIX signal.
rdar://175328961
[ConstraintElim] use icmpLike when creating facts to support trunc nuw to i1 (#197550)
Adding `trunc nuw %x to i1` support in facts the same way as `icmp ne %x, 0`
[compiler-rt] [arm] Fix compilation on non-ELF targets (#197880)
0c539fc057b2e838dc30c7e3229110d0c0e168c8 added new assembly files,
with a literal '.rodata' directive. This doesn't build for non-ELF
targets. Switch to the preexisting CONST_SECTION macro instead, which
expands to either '.const', '.section .rdata,"rd"' or '.section .rodata'
depending on platform.
[Sema] Reject unqualified lookup of local nested class name (#192678)
Clang incorrectly accepts unqualified use of a nested class declared
inside a local class, even when it is not visible in the current scope.
Fixes #184622.
[mlir] only verify moved symbols in transform
When merging named sequences from an external module in the transform
interpreter, only run the inliner verification for operations that were
actually moved rather than all pre-existing operations. This avoids
verifying inlining conditions for operations that wouldn't be inlined by
this logic, and is also more parsimonious.
Reverts #195770. This is a more generic fix.
[libc++] LWG4266: `layout_stride::mapping` should treat empty mappings as exhaustive (#191629)
Fixes: #171325
---------
Co-authored-by: S. B. Tam <cpplearner at outlook.com>
[libc++][mdspan] Refactor bounds checking in `std::extents` (#197001)
Perform bounds checking and casting to `index_type` together, which is
necessary for checking move-only index arguments.
See also: https://github.com/llvm/llvm-project/pull/196574
---------
Co-authored-by: A. Jiang <de34 at live.cn>
[ConstantRange] Optimize multiply with nowrap (#197481)
multiplyWithNoWrap() may currently call all of multiply(), umul_sat()
and smul_sat(), where the former may perform up to 6 double-width
multiplies, and the other two perform 2 and 4 single-width multiplies
respectively.
Optimize this a bit by moving the nowrap handling directly into
multiply(): If we're already doing double-width multiplies, then doing
more on top of that is unnecessary.
Additionally, this also allows us to use only single-width multiplies
for the nuw case. (This is also possible for the nsw case, but the
implementation would be more involved.)
[TableGen] Fix assertion when initializing a bit from !cond or !foldl (#197224)
TableGen hit an assertion when trying to initialize a bit in a bits
field from an unfolded !cond expression like this:
let word{0} = !cond(val : flag);
Fixed by changing CondOpInit::getBits to check for the case that it
already has a bit type, matching the pattern used in OpInit::getBit and
elsewhere.
Fixes #197217
[lldb] Use Expected in BreakpointLocationPredictor (#197730)
This makes it easier to not have long-lived Status objects. Forgetting
to clear those was a problem I ran into in #196891.
[libc] Add some checks to the mmap wrapper (#197694)
- check that the discarded offset bits (both high and low) are zero
(page alignment is checked in the kernel, but this cannot be done values
we discard for mmap2, nor for truncated values on 32-bit systems)
- check for negative offsets (the kernel interface uses unsigned values,
but our off_t is signed)
One thing I'm not checking, but other implementations do, is the size of
the allocation (after page alignment) fits into a ptrdiff_t. I didn't do
that now as it requires figuring how to get (and whether to cache) the
page size. This is mainly relevant for 32-bit systems as no 64-bit
system will let you allocate 2^63 bytes of (virtual) memory.