[mlir] Fix crash in diagnostic verifier for unmatched @unknown expectations (#186148)
When an expected-* directive uses the @unknown location specifier, the
associated ExpectedDiag record has an invalid (null) SMLoc as its
fileLoc. If the expected diagnostic is never produced, emitError() is
called to report the unmatched expectation, but it unconditionally
constructs an SMRange from fileLoc, triggering a null-pointer
dereference (UBSan) and an assertion failure in SMRange's constructor
which requires both endpoints to have equal validity.
Fix by guarding the SMRange construction with a fileLoc.isValid() check.
When fileLoc is invalid, call PrintMessage without a source range.
Fixes #163343
Assisted-by: Claude Code
dnsmasq: remove a too-strict validation
When adding ranges from setaddr.php we do not use the model so
one can input ::1000 etc and then Dnsmasq migration will fail
due to it not setting a constructor. We still validate :: prefix
for constructor use but now take :: prefix verbatim which
doesn't interfere with Dnsmasq service start.
Discussed-with: @monviech
(cherry picked from commit a5773fe71f5703426761b9965bd49e468366de27)
[WebAssembly] combine `bitmask` with `setcc <X>, 0, setlt` (#179065)
The rust `simd_bitmask` intrinsic is UB when the lanes of its input are
not either `0` or `!0`, presumably so that the implementation can be
more efficient because it could look at any bit. To get the "mask of
MSB" behavior of webassembly's `bitmask`, we would like to simply first
compare with a zero vector.
```llvm
define i32 @example(<2 x i64> noundef %v) {
entry:
%1 = icmp slt <16 x i8> %v, zeroinitializer
%2 = bitcast <16 x i1> %1 to i16
%3 = zext i16 %2 to i32
ret i32 %3
}
```
On x86_64, this additional comparison optimizes away, but for wasm it
[22 lines not shown]
[AArch64][GlobalISel] Fix uqadd/sub with scalar operands
Previously, neon uqadd/uqsub would not lower when given s32/s64 operands, as GlobalISel would wrongly try to put the operands on general-purpose register banks. Changing this in RegBankSelection allows the intrinsics to lower just like their signed versions.
[mlir][gpu] Add SymbolUserOpInterface to launch_func op (#173277)
The gpu.launch_func is an operation that performs symbol references.
Currently, its symbol validation logic is implemented within
GPUDialect::verifyOperationAttribute. To improve the clarity and
structure of the validation logic, this PR makes LaunchFuncOp implement
the SymbolUserOpInterface. In addition, implementing this interface
allows the operation to benefit from various symbol-usage analysis
passes.
dnsmasq: remove a too-strict validation
When adding ranges from setaddr.php we do not use the model so
one can input ::1000 etc and then Dnsmasq migration will fail
due to it not setting a constructor. We still validate :: prefix
for constructor use but now take :: prefix verbatim which
doesn't interfere with Dnsmasq service start.
Discussed-with: @monviech
devel/difftastic: update to 0.68.0
Git Support
- Fixed an issue where git with difftastic would terminate with fatal: external diff died when there was an unmerged path.
Parsing
- Updated Bash, C, Go, Lua, Nix, Perl, Python, Rust, Scala, Swift and YAML parsers.
- Fixed an issue with parsing raw string literals in Rust.
Build
- Difftastic now requires Rust 1.77 or later to build.
- Difftastic no longer uses jemalloc on any Windows builds. Previously jemalloc was only disabled for MSVC.
Command Line Interface
- Improved error reporting when invoked with an invalid number of arguments.
Display
- Fixed an issue with inline display where it didn't always respect the value of --context.
- Fixed an issue with side-by-side rendering when files contain tabs.
[LLVM] Make -use-constant-fp-for-scalable-splat the default. (#186422)
Includes a trivial fix to ReassociatePass::OptimizeAdd to force the type of
new ConstantFP nodes.
[mlir][arith][NFC] Use type parser instead of hard-coding type keywords (#186753)
Parse type literals instead of hard-coding them in a switch-case
statement.
Assisted by: claude-opus-4.6
[AArch64][GlobalISel] Fix uqadd/sub with s32 operands
Neon uqadd/uqsub would not lower when given s32 operands, as GlobalISel would wrongly try to put the operands on general-purpose register banks. Changing this in RegBankSelection allows the intrinsics to lower just like their signed versions.
virtio: Ensure power-of-two alignment for indirect queue
Some platforms enforce power-of-two alignment for bus_dma tags. Rounding up
the natural size may result in over-alignment, but should be safe.
PR: 293770
Reviewed by: andrew
Fixes: c499ad6f997c ("virtio: Use bus_dma for ring and indirect buffer allocations")
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55843
[orc-rt] Move SPS controller interface funcs into their own headers. (#186991)
This provides clean separation between the ORC runtime code that
implements runtime functionality and the wrapper functions that permit
this code to be called from the controller via the
ExecutorProcessControl API.
Separating the controller interface from the implementation functions
should allow clients to introduce alternative serialization schemes if
they want (e.g. JSON).
In particular, this commit adds a new orc-rt/include/orc-rt/sps-ci
directory and moves SimpleNativeMemoryMap SPS controller interface into
a new header in that directory. This commit also splits the
implementation and testing of the SPS controller interface for
SimpleNativeMemoryMap into separate files.
[mlir][bytecode] Fix crashes when reading bytecode with unsupported types (#186354)
When using test-kind=2 in the bytecode roundtrip test, integer types
(i32) are replaced by a custom type (TestI32Type) via a type callback.
This exposed two crash scenarios:
1. Reading IntegerAttr with an unsupported type: `getIntegerBitWidth`
returns 0 for unsupported types and emits an error, but
`readAPIntWithKnownWidth` would proceed to call
`reader.readAPIntWithKnownWidth(0)`, creating a zero-width APInt with a
potentially non-zero value. Fix: early-return failure when `bitWidth ==
0`.
2. Reading VectorType with an unsupported element type:
`VectorType::get` asserts that the element type implements
VectorElementTypeInterface. When the element type is replaced by a
custom type that doesn't implement this interface, the program crashes.
Fix: use `VectorType::getChecked` with a diagnostic emitter lambda
instead of `get<VectorType>` in the bytecode builder.
Fixes #128312
[flang][NFC] Converted five tests from old lowering to new lowering (part 33) (#186943)
Tests converted from test/Lower/Intrinsics: ieee_operator_eq.f90,
ieee_signbit.f90, index.f90, iparity.f90, is_contiguous.f90
[AArch64] Remove promotion cost for fixed-length bfloat arith with +sve-b16b16 (#186378)
These operations can be trivially promoted to SVE (with the addition of
a ptrue).