[dsymutil][test] Make pseudo-probe.test independent of od output format (#243925)
`pseudo-probe.test` matched the raw output of `od -t x1`, but the offset
column and the case of the hex digits are not portable. On z/OS, `od`
prints decimal offsets and uppercase hex, so the CHECK lines never
matched even though dsymutil produced the correct bytes:
```
0000000000 0C C1 75 B9 C0 F1 B6 A8 05 00 00 20 5C 85 5E 09
```
vs. the expected
```
0000000 0c c1 75 b9 c0 f1 b6 a8 05 00 00 20 5c 85 5e 09
```
Use `od -An -v -t x1` to drop the offset column, lowercase the output
with `tr A-F a-f`, and remove the offsets from the CHECK lines. The byte
[7 lines not shown]
[ProfCheck] Set default of profcheck-annotate-mem-ops to false (#243961)
This was accidentally left on in the PR that landed it. Turn it off for
now until we get the failures low enough to enable by default and put
stragglers in profcheck-xfail.txt.
[flang-rt][bazel] Configure runtime capabilities for musl and Windows (#243799)
The Bazel Flang runtime assumes Linux glibc capabilities for every
target. Musl lacks execinfo.h, while Windows uses strerror_s instead of
strerror_r, so those target builds fail.
Found while adding Flang support to the
[@llvm](https://github.com/hermeticbuild/hermetic-llvm) BCR module, the
toolchain used by the LLVM Bazel overlay’s --config=hermetic-toolchain.
RuntimeLibcalls: Add signatures for the Darwin sincos stret functions
__sincos_stret and __sincosf_stret return a struct holding the 2
results. Describe the C struct return type in the signature table and
lower for the target ABI. This is a vector on x86-64 for float,
through memory on x86-32 and APCS ARM, and as a struct elsewhere.
This replaces the special case that built the types in C++. Ideally we
would be using the ABI library, but it's incomplete for most targets
and it requires some relayering to use here.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[AMDGPU] Lower -1.0 / x as fneg (rcp x) (#243129)
Lowering -1.0 / x to rcp (fneg x) pins the fneg to x's producer. After
DAGCombiner turns fma(1.0 / x, fneg y, z) into fma(-1.0 / x, y, z)
(see #199909), the fneg lands on e.g. a v_mul_f32 and forces VOP3
(+4 bytes) instead of being a free modifier on the fma.
Lower it to fneg (rcp x) and let the existing fneg combines place it.
Do the same in GlobalISel, where it also lets -1.0 / sqrt(x) form rsq.
Fixes #187482.
ARM: Expand atomic load/store orderings without barriers in IR
Targets without native atomics or barriers marked i32 ATOMIC_LOAD and
ATOMIC_STORE as Custom so it could change the lowering based on the
ordering. Orderings stronger than monotonic would use the legalizer's
expansion to ATOMIC_CMP_SWAP/ATOMIC_SWAP libcalls.
Make this ordering decision in the IR expansion hooks instead since
those are expressive enough to represent the ordering constraint. This
moves the handling to AtomicExpand instead of the DAG legalizer. This
is kind of a workaround, ideally the same hook would be used by both
paths. This allows setting accurate LibCall actions on
ATOMIC_LOAD/ATOMIC_STORE.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[SandboxVec][LoadStoreVec] Rename ScalarConstReinterpret to SameSizeReinterpret (NFC) (#243765)
Rename `ScalarConstReinterpret` to `SameSizeReinterpret` and update its
comments.
The class reinterprets the bits of a value as another type of the same
size. It is used to pack constants in `createConstantVector()`, and it
will also be used to unpack loads of mixed types in #236647, so the old
name no longer describes it.
No functional change.
Made with [Cursor](https://cursor.com)
Co-authored-by: Cursor <cursoragent at cursor.com>
[SandboxVec][DAG] Fix moveInstrNotifier on empty DAG (#243747)
This patch fixes a crash inside an assertion in the DAG move instruction
notifier, when the DAG was empty.
The fix is trivial: if the DAG is empty there is nothing to be done, so
we should early return.
[libc][math] Define C99 floating-point comparison macros in math.h.
Add `isgreater`, `isgreaterequal`, `isless`, `islessequal`,
`islessgreater`, and `isunordered` to `math-function-macros.h` using
the corresponding `__builtin_is*` intrinsics, along with C and C++
include unit tests.
AMDGPU: Use LastSubtargetCache in getSubtargetImpl (#242560)
Reuse the last subtarget for functions with the same function
attribute set and module, or the same subtarget relevant attributes
and module flags, instead of building the subtarget key. This is
faster and works towards all targets using a common pattern.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[lldb][test] Fix expected message in TestPtrAuth.py (#243934)
During the review #242399, I updated the error message, but didn't
update the test. It also fix format error.
[CodeGen] Remove more legacy option spellings that have no in-tree use (#243948)
PR #243179 renamed these options and kept the old spellings as aliases.
Nothing in the tree uses the old spellings, so remove them now.
[ProfCheck] Mark new VP metadata tests as unsupported (#243947)
These fail under profcheck as profcheck automatically runs prof-inject
which makes one of the verification cases fail.
[llvm-profgen] Cache and explain the pre-inliner hot threshold
Compute the hot threshold once in the CSPreInliner constructor instead
of recomputing it for every caller. The input summary stays fixed for
the pre-inliner run.
Document why the ICP checks keep the contextless summary. The loader's
nested summary depends on the inline decisions and can give a lower
threshold. Using a lower estimate could let more indirect targets spend
the caller's inline size budget, leaving less room for other callees.
Rejected contexts instead follow the existing base-profile merge path.
The loader continues to apply its own hotness check.
Clarify nearby comments and diagnostics so a pre-inliner rejection is
not presented as an exact prediction of the loader. Add coverage for an
explicit hot-count override. Profile selection is unchanged.
Assisted-by: GPT-6 Astra
[llvm-profgen] Respect the sample loader's indirect-call promotion limits
The CS pre-inliner can plan to inline a target that the sample loader
will not promote. Keep rejected contexts in the callee's base profile
instead of spending the caller's inline budget on them.
Read the loader's hotness, initial exemption, and maximum-promotion
options. Account for call-target counts being replaced by nested head
estimates as targets are accepted. Leave the compiler thresholds intact.
Apply the gate only to sites with an indirect-call pseudo probe. Collect
that evidence during the existing decoder pass, including functions and
inlinees skipped by the sample GUID filter. Add a decoder callback test
and profile tests for the promotion limits and call-probe checks.
This follows the compiler-side recovery change, which also handles hot
contexts already nested in existing generated profiles.
Assisted-by: GPT-6 Astra
[CodeGen] Remove legacy option spellings that have no in-tree use (#243946)
PR #243746 renamed these options and kept the old spellings as aliases
(convenient to downstream users that might use them). Nothing in the
tree uses the old spellings, so remove them now.
[SampleProfile] Recover indirect targets after iterative inlining
An indirect fallback survives when a target is promoted and inlined. Recording its hottest target on every scan can therefore merge samples from an inline copy into the standalone function. Recording only one target also loses samples for other targets that stay out of line.
Collect recovery candidates from the calls that remain after inlining finishes. Use the existing promotion history to exclude promoted targets from the fallback, and recover promoted direct calls separately if they did not inline. This also handles promotion without a successful inline or another iteration.
[lldb] Fix a crash in SBTypeSynthetic::IsEqualTo (#243932)
Comparing a valid SBTypeSynthetic to an invalid one dereferenced a null
pointer.
Assisted-by: Claude
[SPIR-V] Drop type incompatible attributes after aggregate signature rewrite (#242704)
Retyped functions and calls that kept attributes like nofpclass on i32,
which are rejected by verifier
[CodeGen] Declare command line options of more passes in TableGen (#243746)
Renames, with the old spellings kept as aliases:
* Negative to positive: -no-stack-coloring, -no-stack-slot-sharing,
-disable-phi-elim-edge-splitting and -no-phi-elim-live-out-early-exit
become -stack-coloring, -stack-slot-sharing, -phi-elim-edge-splitting
and -phi-elim-live-out-early-exit.
* Drop enable-: -enable-shrink-wrap, -enable-shrink-wrap-region-split
and -enable-tail-merge become -shrink-wrap, -shrink-wrap-region-split
and -tail-merge, and -enable-spill-copy-elim becomes
-mcp-spill-copy-elim.
* Add the pass prefix: the MachineLICM options gain machine-licm-, and
-aggressive-machine-cse, -csuses-threshold, -dataflow-edge-limit and
-protect-from-escaped-allocas become -machine-cse-aggressive,
-machine-cse-csuses-threshold, -twoaddr-dataflow-edge-limit and
-stackcoloring-protect-from-escaped-allocas.
Other changes:
[6 lines not shown]
[libc++][docs] Make status colors readable in Furo dark mode
The status table cell colors are light pastels. Furo's dark theme uses light
text, so cells such as "Complete" were unreadable. Use darker backgrounds
for the explicit dark theme and for the automatic theme when the browser
prefers a dark color scheme.
LLM-aided