[lldb] Fix logic issue in TestDAP_stopped_events.py (#183382)
The subset should actually be the expected data because the real thread
data may have additional information.
[AMDGPU] Adding FoldMemRefOpsIntoTransposeLoadOp pattern (#183330)
Before the fix we wouldn't fold a trivial expand_shape as index
computation. This will later force expand_shape to materialize into a
extract_stride_metadata and a reinterpret_cast unnecessarily. The
example below showcase the motivation of a source IR that won't be able
to fold today.
```mlir
%expanded = memref.expand_shape %buf [[0, 1], [2, 3]]
: memref<32x128xf16, strided<[128, 1], offset: ?>, #gpu.address_space<workgroup>>
into memref<1x32x8x16xf16, strided<..., offset: ?>, #gpu.address_space<workgroup>>
amdgpu.transpose_load %expanded[%i, %j, %k, %l]
: memref<1x32x8x16xf16, ...> -> vector<4xf16>
```
With this pattern that matches the more generic
`FoldMemRefAliasOpsPass`, the expand_shape can now fold into
transpose_load op like other load/stores.
[4 lines not shown]
[CodeGen] Expand power-of-2 div/rem at IR level in ExpandIRInsts. (#180654)
Previously, power-of-2 div/rem operations wider than
MaxLegalDivRemBitWidth were excluded from IR expansion and left for
backend peephole optimizations. Some backends can fail to process such
instructions in case we switch off DAGCombiner.
Now ExpandIRInsts expands them into shift/mask sequences:
- udiv X, 2^C -> lshr X, C
- urem X, 2^C -> and X, (2^C - 1)
- sdiv X, 2^C -> bias adjustment + ashr X, C
- srem X, 2^C -> X - (((X + Bias) >> C) << C)
Special cases handled:
- Division/remainder by 1 or -1 (identity, negation, or zero)
- Exact division (sdiv exact skips bias, produces ashr exact)
- Negative power-of-2 divisors (result is negated)
- INT_MIN divisor (correct via countr_zero on bit pattern)
[2 lines not shown]
[AArch64] Decompose FADD reductions with known zero elements
FADDV is matched into FADDPv4f32 + FADDPv2f32p but this can be relaxed
when one element (usually the 4th) or more are known to be zero.
Before:
movi d1, #0000000000000000
mov v0.s[3], v1.s[0]
faddp v0.4s, v0.4s, v0.4s
faddp s0, v0.2s
After:
mov s1, v0.s[2]
faddp s0, v0.2s
fadd s0, s0, s1
graphics/converseen: Update to 0.15.2.0
ChangeLog: https://converseen.fasterland.net/changelog/
* Fixed conversion and resolution issues with certain formats
* Fixed a potential issue with file paths
* Corrected a typo in the main window
* Updated Italian translation
* Various Bugfixes
[CIR] Update cir::ResumeOp to require an EH token (#183192)
This updates the cir::ResumeOp operation to require an EH token operand.
We already had the token available at both locations where the operation
was being created. Adding this operand makes finding the token more
robust during CFG flattening.
This change was entirely AI generated, but I have reviewed it closely.
[flang][openmp] Add support for ordered regions in SIMD directives (#… (#183379)
Add support for ordered regions within SIMD directives (!$omp simd
ordered and !$omp do simd ordered). This initial implementation matches
Clang's behavior.
In SIMD directives, loop induction variables have an implicit linear
clause with deferred store semantics (storing to .linear_result). To
properly support ordered regions, the LinearClauseProcessor rewrites
variable references to use .linear_result in:
- omp.ordered.region: Code inside ordered blocks
- omp_region.finalize: Code after ordered blocks
Note: The vectorizer cannot currently vectorize loops with ordered
regions. Future enhancement would require generating lane loops or
unrolling ordered regions across SIMD lanes while maintaining ordering
semantics.
This PR is a reland for https://github.com/llvm/llvm-project/pull/181012
and fixes the regression caused by syntax change in IR for linear clause
cad/ngspice_rework: fix build with libc++ 21
With libc++ 21 cad/ngspice_rework fails to build, with errors similar to:
In file included from hicumL2temp.cpp:11:
../../../../src/include/cppduals/duals/dual:444:8: error: 'is_compound' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization]
444 | struct is_compound<duals::dual<T>> : true_type {};
| ^
/usr/include/c++/v1/__type_traits/is_compound.h:25:8: note: marked '_Clang::no_specializations' here
25 | struct _LIBCPP_NO_SPECIALIZATIONS is_compound : _BoolConstant<__is_compound(_Tp)> {};
| ^
/usr/include/c++/v1/__config:1167:9: note: expanded from macro '_LIBCPP_NO_SPECIALIZATIONS'
1167 | [[_Clang::__no_specializations__("Users are not allowed to specialize this standard library entity")]]
| ^
This is because libc++ 21 no longer allows specializing a number of
standard library entities. Delete out the specialization to make the
build complete.
[5 lines not shown]
cad/ngspice_rework: fix build with libc++ 21
With libc++ 21 cad/ngspice_rework fails to build, with errors similar to:
In file included from hicumL2temp.cpp:11:
../../../../src/include/cppduals/duals/dual:444:8: error: 'is_compound' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization]
444 | struct is_compound<duals::dual<T>> : true_type {};
| ^
/usr/include/c++/v1/__type_traits/is_compound.h:25:8: note: marked '_Clang::no_specializations' here
25 | struct _LIBCPP_NO_SPECIALIZATIONS is_compound : _BoolConstant<__is_compound(_Tp)> {};
| ^
/usr/include/c++/v1/__config:1167:9: note: expanded from macro '_LIBCPP_NO_SPECIALIZATIONS'
1167 | [[_Clang::__no_specializations__("Users are not allowed to specialize this standard library entity")]]
| ^
This is because libc++ 21 no longer allows specializing a number of
standard library entities. Delete out the specialization to make the
build complete.
[3 lines not shown]
[CodeGen] Add tests for ShadowStackGCLowering IR pass (#183167)
Add llvm/test/CodeGen/Generic/shadow-stack-gc-lowering.ll testing the
opt-level behavior of the shadow-stack-gc-lowering module pass,
covering:
- Single root: frame push/pop at entry and return
- Two roots: multi-slot frame, NumRoots=2/NumMeta=0 in the frame map
- Root with non-null metadata: NumMeta=1, metadata array in gc_map
- Mixed metadata: CollectRoots ordering (metadata roots sorted first)
- No roots: pass must leave the function unchanged
- Invoke: EscapeEnumerator inserts pop on both normal and unwind exits
As requested in https://github.com/llvm/llvm-project/pull/178436, since
the only existing tests seem to be that llc doesn't crash (in
llvm/test/CodeGen/X86/GC)
Co-authored-by: Claude Sonnet 4.6 <noreply at anthropic.com>
zpl_super: prefer "new" mount API when available
This API has been available since kernel 5.2, and having it available
(almost) everywhere should give us a lot more flexibility for mount
management in the future.
Sponsored-by: TrueNAS
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18260
system(3): Fix null case
Our manual page states that if given a null pointer, system() returns
non-zero if the shell is available and zero if it is not. This is
consistent with the C standard's description of system(), but it is not
what we actually do. What we actually do is always return non-zero, as
required by POSIX.
As the POSIX rationale explains, implementing the logic required by the
C standard does not violate POSIX, since a conforming system always has
a shell, therefore the logic will always return non-zero.
Since our libc is commonly used in non-conforming situations such as
chroots or thin jails, we should implement the full logic required by
the C standard.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: obiwac, bnovkov, kevans
Differential Revision: https://reviews.freebsd.org/D55484
system(3): Clarify return values
Our manual page currently states that system() will return 127 if it
fails to execute the shell. The actual return value is, to quote POSIX,
“as if the command language interpreter had terminated using exit(127)
or _exit(127)”.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: bnovkov, kevans
Differential Revision: https://reviews.freebsd.org/D55483
system(3): Improve signal handling
Ignore SIGINT and SIGQUIT and block SIGCHLD, as POSIX requires.
To deal with the concurrency problem described in POSIX, we keep track
of the count of concurrent invocations. We ignore and block signals
only when the counter was zero before we incremented it, and restore
them only when the counter reaches zero after we decrement it.
Note that this does not address the issue of thread cancellation.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: bnovkov, sef, kevans
Differential Revision: https://reviews.freebsd.org/D55471
[AMDGPU] Implement -amdgpu-spill-cfi-saved-regs
These spills need special CFI anyway, so implementing them directly
where CFI is emitted avoids the need to invent a mechanism to track them
from ISel.
Change-Id: If4f34abb3a8e0e46b859a7c74ade21eff58c4047
Co-authored-by: Scott Linder scott.linder at amd.com
Co-authored-by: Venkata Ramanaiah Nalamothu VenkataRamanaiah.Nalamothu at amd.com