[AArch64] Ignore processor families for inlining (#239528)
#205750 made the AArch64 tuning features `InlineIgnore`, but not the
processor families that `-mtune` / `"tune-cpu"` select (`TuneAppleM5`,
`TuneNeoverseN1`, ...). Functions tuned for different processors still
can't be inlined into each other, even `always_inline` ones:
```
remark: 'callee, is not inlined into caller': conflicting target features
```
Since #179136, clang defaults to `-mtune=apple-m5` on macOS, so in LLVM
23 clang-built code can no longer be inlined into IR without a tune CPU.
PoCL hits this: its barrier helpers stay out of line and kernels
miscompile.
The family only selects tuning parameters. The features it implies are
separate bits and are still compared. RISC-V already ignores its
processor families (#205940).
[IndVars] Expand exit values in the preheader (#239533)
Use the preheader insertion point for all exit-value rewrites and
check that each SCEV is safe to expand there.
[Remarks] Make YAML remark arguments round-trip (#227654)
The YAML remark serializer writes an argument value with more than one
newline as a literal block scalar. Block scalars have no escapes, so if
the value also contains a control character other than tab or newline,
the raw byte ends up in the file. For `"abc\ndef\n\x01ghi"`, PyYAML
rejects the document with `unacceptable character #x0001`, while
`llvm-remarkutil` accepts it without complaint.
`Output::blockScalarString` now writes such values as double-quoted
scalars, which escape them, and `Input` already accepts either form. The
check lives in YAMLTraits rather than the remark serializer, so it
covers every `BlockScalarTraits` user. Ordinary multi-line values keep
the block form. Three more cases also fall back to the quoted form:
- Non-printable Unicode characters. PyYAML rejects C1 controls, and it
reads NEL, LS and PS as line breaks.
- A carriage return, since a reader turns a CR inside a block scalar
into a line break.
- A first line that starts with a space. Readers take the block's
indentation from that line, so `" abc\ndef\nghi"` used to produce a
[19 lines not shown]
[InstCombine] Fix poison propagation in logical masked icmp fold (#239551)
For the logical case, the replacement with RHS needs to be careful about
not being more poisonous, either due to poison flags (icmp samesign,
trunc nuw/nsw) or poison lanes in constants. Note that the matching here
is performed by decomposeBitTest(), so even though this code itself is
using m_APInt(), it's actually working on re-created constants without
poison lanes, even if the original ones are poison.
I'm fixing this here by just recreating the icmp+and for the logical
case. I originally wanted to just freeze the RHS, but this is not
sufficient, because we need the poison lanes to actually match the
constant the analysis was performed on.
I also considered replacing other uses of RHS with the re-created
instructions to avoid multi-use instruction increase, but this does add
some extra complexity and doesn't appear to matter in practice
(https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/1962).
Fixes https://github.com/llvm/llvm-project/issues/236299.
Fixes https://github.com/llvm/llvm-project/issues/234680.
[SPARC] Fix unsigned int to FP conversions of 0 giving -0.0 when rounding down (#239907)
On 64-bit SPARC, unsigned i32 to FP conversions were expanded by the
generic legalizer, which builds the double 0x43300000:x and subtracts
2^52. For an input of 0 this computes 2^52 - 2^52, which is -0.0 when
rounding toward negative infinity. With strict FP this breaks glibc's
getpayload and log10 tests in round-downward mode. The generic
non-strict unsigned i64 to f64 expansion, which splits the operand into
2^84 and 2^52 biased halves, has the same problem.
When i64 is legal, zero-extend an i32 operand and use the signed 64-bit
conversion (fxtos/fxtod/fxtoq), as GCC does. For i64 to f64, use the
same sequence as the strict expansion: if the sign bit is set, halve the
operand keeping the low bit sticky, convert with fxtod and double the
result. Both are correct in all rounding modes and shorter than the
expansions they replace.
Fixes #239346
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[libc] Make canonicalizef128, modff128 and remquof128 use the emulated float128 type (#223769)
This PR makes canonicalizef128, modff128 and remquof128 use the emulated Float128 type.
Closes: #221569
[clang-tidy] Add ZeroOnly integer literal mode to argument-comment (#237890)
Many C APIs take 0 to mean "no flags" or "the default", and a bare 0
doesn't
tell the reader which parameter it sets. CommentIntegerLiterals of
bugprone-argument-comment asks for a comment on every integer literal
though,
including sizes, modes and counts whose meaning is clear from their
value.
Let's turn CommentIntegerLiterals into an enum with the values None,
ZeroOnly
and All. ZeroOnly only asks for a comment on integer literals with the
value
zero. The option keeps accepting true and false, which mean All and
None, so
existing configurations keep working. --dump-config prints All or None
for
them.
[3 lines not shown]
[mlir][arith] Fix f8E8M0 zero expansion (#238377)
Fixes the arith expansion of f8E8M0 to correctly handle the all zeros
encoding which was converted to zero instead of 2^-127.
The smallest representable value of f8E8M0 is an f32 subnormal which was
lost by the exponent bits conversion. This also aligns the arith
expansion with constant folding.
Assisted-by: Claude
finance/py-pyiso8583: [NEW PORT] ISO 8583 message encoder and decoder for Python
pyiso8583 is a Python library for encoding and decoding ISO 8583
financial transaction messages. It supports configurable message
specifications, field encodings, and variable-length data elements.
The library can be used to develop and test applications that exchange
ISO 8583 messages.
WWW: https://github.com/knovichikhin/pyiso8583
www/{nginx,nginx-devel,freenginx}: 3rd-party modules management
Build the otel and redis modules from their own ports instead of inline
sources. OTEL now tracks the official nginx-otel upstream instead of the
osokin snapshot, and HTTP_REDIS builds from a maintained redis module in
place of the unmaintained one.
Sponsored by: Netzkommune GmbH
www/nginx-module-redis: Add New Port
Sources of the redis module, an HTTP content handler that reads one key
from a Redis server with a single GET and serves the value as the
response body, the way the bundled memcached module serves a memcached
value. The nginx ports build ngx_http_redis_module.so from here when
their HTTP_REDIS option is enabled.
Sponsored by: Netzkommune GmbH
www/nginx-module-otel: Add New Port
Sources of the otel module, the official nginx OpenTelemetry module. It
exports spans over OTLP/gRPC and supports W3C trace context propagation.
The nginx ports build ngx_otel_module.so from here when their OTEL option
is enabled.
Sponsored by: Netzkommune GmbH
[libc] Define TCP_CM_INQ (#239982)
The kernel's headers name the control message type that TCP_INQ asks for
separately. gRPC reads the byte count back by that name and does not
define it when TCP_INQ is already defined, so it did not compile.
Assisted-by: Claude
[clang] Fix ARM64X driver checks for in-process cc1 (#240278)
I missed updating `arm64x.c` in #222531. It uses `CHECK-NEXT` between
the two cc1 commands, but in-process execution now prints `(in-process)`
between them, causing the Fuchsia buildbot failure.
This adjusts the check and adds explicit coverage for both cc1 modes.
Both pass locally. Could we take this small test-only follow-up without
reverting and relanding #222531?