[flang][MIF] Update prif_coarray_handle in accordance with PRIF 0.8 #214080 (#214747)
In PRIF revision 0.8, the representation of `prif_coarray_handle` was
changed. This PR updates this representation for this type and updates
the MIFOpConversion pass for the relevant operations.
Fixes issue #214080
A minor fix has been made to the deallocation to ensure that, on the
Flang side, the variable is properly deallocated, since previously the
deallocation was only performed at the `coarray_handle` level.
[SPIR-V] Fix FaceForward combine erasing unrelated users (#214626)
Only erase the matched select and let normal DCE remove producers that
actually become dead
www/code-server: Update to 4.131.0
Update to code-server 4.131.0, which bundles VS Code 1.131.0.
Changelog: https://github.com/coder/code-server/releases
Sponsored by: Netzkommune GmbH
[InstCombine] Fold icmp on frexp exponent to fcmp on fabs(x) (#210711)
Recognize signed icmp predicates comparing extractvalue(frexp(x), 1)
against an
integer constant and rewrite them as equivalent fcmp comparisons of
fabs(x)
against the corresponding power-of-two threshold.
frexp(x) returns a mantissa in [0.5, 1) and an exponent E such that
2^(E-1) <= | x | < 2^E.
When code only checks that exponent against a constant, the comparison
can be rewritten directly in terms of | x |, dropping the need for
frexp's exponent output:
icmp spred i32 (extractvalue (frexp x), 1), C
--> fcmp fpred float (fabs x), 2^ExpVal
Predicate mapping:
- slt --> olt (ExpVal = C-1)
[26 lines not shown]
[InstCombine] Fold comparisons of x & -x with 0 and 1 (#213709)
This folds equality comparisons of `x & -x` with zero and one:
- `(x & -x) == 0` to `x == 0`
- `(x & -x) != 0` to `x != 0`
- `(x & -x) == 1` to `trunc x to i1`
- `(x & -x) != 1` to `!(trunc x to i1)`
The fold supports scalar, fixed-vector, and scalable-vector integer
types wider than `i1`. The `!= 1` fold is limited
to one-use `and` instructions to avoid increasing the instruction count.
Alive2: https://alive2.llvm.org/ce/z/Zwy2hW
Fixes #213708
X86: Simplify the EH_LABEL Expand condition (#213130)
Re-express the opt-out handling of EH_LABEL. The special
case is 32-bit non-GNU Windows, and the net result is to skip
printing unused labels. Try to make this more comprehensible
to help figure out where this logic should really be.
I want to eliminate use of the TargetOptions::ExceptionModel,
which ideally wouldn't be needed in a TargetLowering
constructor.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[InstCombine] Simplify fractions when there is no overflow (#210516)
Use Greatest Common Factor to avoid making bigger immediates.
Alive2 Proof: https://alive2.llvm.org/ce/z/3gEVTV
Resolves #210452
vfs_mountroot: unmute console in interactive prompt
If boot_mute is set the system appears to hang during the mountroot
prompt. Temporarily unmute the console so the prompt is visible.
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D58549
(cherry picked from commit e96f1cbd690e68594fc8812de634f43c6711aa97)
vfs_mountroot: unmute console in interactive prompt
If boot_mute is set the system appears to hang during the mountroot
prompt. Temporarily unmute the console so the prompt is visible.
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D58549
(cherry picked from commit e96f1cbd690e68594fc8812de634f43c6711aa97)
[InstCombine] Fold cttz(mul X, OddC) -> cttz(X) (#214376)
InstCombine already turns cttz(X, false) into cttz(X, true) when a
dominating condition proves X != 0. Issue #213877 points out this fails
once X is multiplied by an odd constant: the reproducer's `mul i64 %x,
3`
carries no nsw/nuw, so isNonZeroMul can't prove the product is nonzero
and
the flag is never set.
Multiplying by an odd constant preserves the trailing-zero count, so add
cttz(mul X, OddC) -> cttz(X). Rewriting the operand back to X is what
unblocks the existing reasoning: the branch form (test0_odd_mul in
known-non-zero.ll) is then handled by the known-non-zero path in
foldCttzCtlz, and the select form by the existing relaxation in
foldSelectCttzCtlz.
cttz-only -- the identity does not hold for ctlz.
[4 lines not shown]