Skip to content

merge main into amd-compiler-vkallesh-test#3163

Closed
vkallesh wants to merge 147 commits into
amd-compiler-vkallesh-testfrom
merge-main-into-amd-compiler-vkallesh-test-20260702
Closed

merge main into amd-compiler-vkallesh-test#3163
vkallesh wants to merge 147 commits into
amd-compiler-vkallesh-testfrom
merge-main-into-amd-compiler-vkallesh-test-20260702

Conversation

@vkallesh

@vkallesh vkallesh commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Test PR for validating auto-merge workflow changes

This PR tests the latest changes to the merge-main-into-amd-staging.yml workflow by:

  1. Merging llvm/llvm-project main into the test branch amd-compiler-vkallesh-test
  2. Triggering the Multi-Arch CI workflow for the test branch
  3. Validating the auto-merge logic:
    • Waits for all mandatory gating checks to complete
    • Requires +1 approval before merge
    • Even if approval comes early, waits for all tests to complete
    • Auto-merges once mandatory tests pass AND approval is present

This mirrors the behavior expected for amd-staging branch PRs.

Note: This PR requires manual approval to trigger the auto-merge after tests pass.

Made with Cursor

eisenwave and others added 30 commits July 1, 2026 13:14
…lvm#206326)

1. Fix typo in `note_invalid_ucn_name_loose_matching` message.
2. Fix unprintable characters appearing in diagnostic messages.
3. Stop offering low-value fix suggestions when illegal characters
appear in the name.
…lvm#206863)

An `!$acc routine` directive placed directly within an interface block (as an
interface-specification, e.g. preceding the interface body it names) failed to
parse and produced a misleading cascade of errors.

Accept the OpenACC ROUTINE directive as an additional interface-specification
alternative, mirroring the existing extension that allows a ROUTINE directive in
a module subprogram part / at the top level. The grammar is widened narrowly to
the ROUTINE construct only (not the whole OpenACC declarative construct). A named
directive applies to the interface body it names; name resolution already runs in
a separate pass after the interface-body symbols are created, so the 
directive-before-body ordering resolves correctly and the ROUTINE information is
attached to the named procedure's symbol.

This is documented as a Flang extension in OpenACC-extensions.md.

Assisted-by: AI
Remove outdated FIXME comments from weak-crossing SIV tests where the
expected dependence results are now documented by the CHECK lines.

Also clarify the overflow test comment and fix the described second
access from A[3*i - 2] to A[3*i + 1].

Signed-off-by: Ruoyu Qiu <cabbaken@outlook.com>
…suboptimal (llvm#206320)

Closes llvm#189809

This patch implements LWG 3662 and adds the related functional and
nonnull tests.

---------

Co-authored-by: A. Jiang <de34@live.cn>
GCC 7.5 rejects two newer C++ idioms:

- LifetimeSafety/FactsGenerator: replace ArrayRef CTAD with an explicit
ArrayRef<const Expr *> to avoid GCC 7's broken brace-init deduction.
- ScalableStaticAnalysisFramework: add explicit std::move() on
unique_ptr<Derived> returns (pre-P1825, GCC 7 won't implicitly move).

No behavior change; restores compatibility with GCC 7.5.

Co-authored-by: Garbowski, Mateusz <mateusz.garbowski@intel.com>
…came relocation-free (llvm#206945)

Regressed by 0b413b7, llvm#206753


Issue:

```
  /build/source/llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp: In member function 'bool
  {anonymous}::M68kOperand::isPCIBD32() const':
  /build/source/llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp:516:11: error:
  'M68kMCRegisterClasses' was not declared in this scope
    516 |           M68kMCRegisterClasses[M68k::XR32RegClassID].contains(MemOp.InnerReg));
        |           ^~~~~~~~~~~~~~~~~~~~~
```
Following from the previous patch, this patch adds support to Dexter for
generating expected values for !step nodes. This is relatively limited:
the kind of !step which this is most well-suited to this is !step
exactly, as the !step order of ignoring extra lines is redundant (all
lines are added as expected values), and !step never can't know what
lines could have been stepped on but weren't without some extra work
(e.g. finding viable breakpoint locations in the enclosing state node).
…lvm#206373)

Fixes llvm#201632.

This patch fixes an assertion failure when code completion is triggered
inside an ill-formed lambda's trailing requires-clause, as in
```cpp
void f() {
  []() requires x /*invoke completion here*/
```
https://godbolt.org/z/a66s7Y5cx

When `tok::code_completion` is reached, parsing is cut off before the
end of the declarator. This leaves the lambda's call operator without a
type, thus triggering the `!isNull() && "Cannot retrieve a NULL type
pointer"` assertion when `AddOrdinaryNameResults` calls
`FunctionDecl::getReturnType()` later.

Fix by guarding the `getReturnType()` call with a null check.

Note: The crash stacktrace for the reproducer above differs slightly
from llvm#201632. Here, parsing is cut off during the parsing of the
constraint expression. In llvm#201632, parsing is cut off later during
actual template parsing in `Parser::ParseTemplateIdAfterTemplateName`.
Both leave the lambda without a `FunctionType`. Tests for both are
included.
…lvm#206310)

While merging blocks, `transformToStructuredCFBranches` may try to erase
blocks that still have uses. This may happen when the block has
self-loop or when it has 1 successor, but the successor has multiple
predecessors. This probably happens only with unreachable blocks in the
function.

Note that running a DCE pass before CF to SCF transform would remove the
triggering assert in the lit test.

Fixes llvm#206086.
…lvm#206958)

Add a test case with a direction vector of `[* > =]`. Interchanging the
inner two loops is legal in this case, but it is currently not applied
because the definition of the "normal" form of direction vectors is not
good.
…en.py (llvm#206971)

Newer glibc versions use the identifier `__unused`. To run the test
successufly again disable the `__unused` check with glibc.
…lvm#205509)

We currently have `[system]` attributes in the modulemap, which
automatically makes the headers inside the module system headers. This
disables warnings when running the tests, which we generally don't want.
We also already have `#pragma GCC system_header` everywhere and use
`-isystem`, so there isn't much need for the tag in the modulemap as
well.
Even if multiple fields reference them. I found this debugging AArch64
POE which has a register that contains 16 permission fields. All of
which use the same enum type.

Before these changes:
```
(lldb) register info por
<...>
Perm15: 0 = No Access, 1 = Read, 2 = Execute, 3 = Read, Execute, 4 = Write, 5 = Write, Read, 6 = Write, Execute, 7 = Read, Write, Execute <... 14 copies of the enum one per field...>
Perm0: 0 = No Access, 1 = Read, 2 = Execute, 3 = Read, Execute, 4 = Write, 5 = Write, Read, 6 = Write, Execute, 7 = Read, Write, Execute
```
After:
```
(lldb) register info por_el0
<...>
Perm15, Perm14, Perm13, Perm12, Perm11, Perm10, Perm9, Perm8, Perm7, Perm6, Perm5, Perm4, Perm3, Perm2, Perm1, Perm0: 0 = No Access, 1 = Read, 2 = Execute,
                                                                                                                      3 = Read, Execute, 4 = Write,
                                                                                                                      5 = Write, Read, 6 = Write, Execute,
                                                                                                                      7 = Read, Write, Execute
```
Which looks weird because we indent the enum according to the list of
fields still, but I may change that later. Anyway, this won't be a
problem for most cases where 2 or 3 fields share a type. This register
is an extreme example.

A unit test has been added and a test for POE using the existing core
file tests. They both test the same thing but the POE test is there to
show a motivating example.

Assisted by: Codex (gpt 5.5)
… pass (llvm#206755)

Fix `affine-pipeline-data-transfer` to skip loops with a constant trip
count ≤0, avoiding invalid DMA generation that leads to wrong code.
The after_hit_count attribute for a state node causes it to become
active only after it would have become active N times. This uses the
existing logic for incrementing hit counts, i.e. after the node becomes
"active", we will not add another hit count until it stops being active
for at least one step. Since state nodes with after_hit_count do not
become active before reaching the required hit count, this requires us
to keep track of an "early" set of state nodes, meaning nodes that would
be active if not for their after_hit_count.
Adds noexcept specifiers that were missing from some methods in RTTI.h.
Instead of a boolean plus writing errors to a stream.

llvm::Error is either success or an error message, unlike
before where we could (and did sometimes) succeed but 
also have an error message.

We can do this for DisableLogChannel too but 
I'll do that in a follow up.
Replace raw TSFlags accesses with SIInstrFlags predicate calls in
AMDGPUDisassembler.

Part of a series following the introduction of SIInstrFlags predicates.
This patch enables the ability for state nodes to check conditions,
meaning they will be active only if the condition is met.

Condition evaluation is somewhat language specific; we directly check
whether the value of the evaluated expression is "true"
(case-insensitive), which works for the languages we actually use Dexter
with, but may require generalizing in future.

We also cache conditions as they are evaluated; each time we step, we
clear all cached conditions for the current frame and any expired
frames, but we keep the cached conditions for any frames rootwards from
the current frame; this prevents us from unexpectedly exiting out of a
callee frame because of debug info not surviving a stack unwind; if the
early exit is desired, an !and{at_frame_idx, condition} under the lower
frame may suffice.
…00790)

Since 82e94a5, `ompt_get_num_devices`
was hard coded to always provide a return value of `1`, regardless of
the actual number of devices. Tools relying on this return value were
henced forced to use other approaches to estimate the number of
available devices.

To improve the situtation, map the returned value to the one provided by
`omp_get_num_devices()`. This does not resolve the issue completely
though. When OMPT is initialized through `libomptarget.so`, the
PluginManager, providing the number of devices, is not initialized until
after OMPT has been fully set up. This means that tools, trying to
retrieve the number of devices during the _initialize_ callback, will
still receive the incorrect number of devices.

Still, this is a significant improvement compared to the prior state
which provided an incorrect result for most of the program runtime.

Closes llvm#196829

---------

Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
…wrapper (llvm#201135)" (llvm#206961)

I believe I fixed the immediate issues that were causing regressions
with this, and now this is leading to its own regressions in building
Pytorch apparently. This was explicitly marked as a hack, and this
should resolve an ongoing issue so we should revert this for now.

Should fix LCOMPILER-2396

This reverts commit eaff67c.
…ze (llvm#206871)

Per C++17 [depr.temporary.buffer]/4, `get_temporary_buffer` is required
to return `{nullptr, 0}` when the size argument is zero or negative.
libc++ used to correctly handle this, but the refactoring in
94e7c0b got this wrong.

GCC generally warns on negative size due to `-Walloc-size-larger-than=`,
which is false positive due to incomplete control flow analysis. The
warning is coupled with optimizations, and this patch make tests
suppress it instead.
mapVectorType in ABITypeMapper incorrectly used ElementCount::getFixed
for all vector types, including scalable ones (e.g. vector<[4]xf32>).
This results in scalable vectors being mapped as fixed-size vectors,
which produces incorrect ABI lowering for SVE and RISC-V V targets.
…llvm#206943)

Replace a known-non-NaN operand of an UNORD/ORD FP compare with the
other operand, so we emit `cmpp a, a` instead of materializing the
constant with `vxorpd`. Matches GCC.

Added combine-fcmp-uno-self.ll which covers the folding and a negative
case.

Fixes llvm#202756
Re-exposes LLVM-libc's `__divdf3` as `shared::divdf3` for reuse by
compiler-rt's builtins.

Stacked change - merge these first:
- llvm#200094
- llvm#205669
- llvm#205670
- llvm#205671
- llvm#205672
- llvm#205673
- llvm#205674

Part of llvm#197824
…m#206805)

See discussion in llvm#201236 -
we're close to enabling wide characters in libc++ when it's built on top
of llvm-libc.

llvm-libc headers use `const wchar_t*` return type for selected wchar
functions, so we need to configure libc++ to assume that const-overloads
for these functions are available in this case, and the implementations
in libc++ wrapper around `<wchar.h>` are not needed.
lhames and others added 18 commits July 2, 2026 11:59
These APIs are all unconditionally nothrow: their bodies either call
already-noexcept APIs, or move std::string / std::exception_ptr /
std::unique_ptr members whose move constructors are already noexcept.
The 'r' asm constraint binds an operand to a general-purpose register.
For tied inline asm operands, Clang may promote a smaller integer input
to match a larger non-scalar register output. Only allow that path when
the output size can be represented by an integer type that fits in a
general-purpose register.

Otherwise, diagnose with err_store_value_to_reg before CodeGen attempts
to lower the asm and crashes.

This keeps GPR-sized aggregate/class outputs accepted while rejecting
larger array, struct, union, complex, vector, and class outputs. Add
Sema coverage for the affected C and C++ cases.

Fixes llvm#204775
llvm#207114)

Reworks Session's controller-attachment API so that clients no longer
construct or hold a ControllerAccess directly:

- attach<ControllerAccessT>(BI, Args...) now constructs the
ControllerAccess internally, passing *this as the first constructor
argument. Suitable for ControllerAccess implementations whose
construction cannot fail.

- tryAttach<ControllerAccessT>(BI, Args...) is the new fallible
counterpart to attach. It forwards *this and the given args to
ControllerAccessT::Create, which must return an
Expected<std::shared_ptr<ControllerAccessT>>. On success, proceeds to
call connect on the instance, otherwise returns the Error. This lets
implementations surface setup failures (e.g. failing to bind a socket)
synchronously as an Error, without ever handing back a
usable-but-unconnected object.

- The raw attach(shared_ptr<ControllerAccess>, BI) entry point becomes
the private implementation detail doAttach.

Also adds ControllerAccessTest.TryAttach{Success,Failure} covering the
new factory-based path, and updates existing call sites to the new API.
…tor (llvm#207094)

SimplifyCFG can accidentally hoist `musttail` away from the `ret` if
`hoistCommonCodeFromSuccessor` skipped a differing instruction, causing
a misverify. So we need to guard the `musttail` call to make sure that the `ret` is
hoisted along with the call. This can only happen when no instruction
has been skipped so both successors be folded into the the predecessor,
leaving a valid `musttail` call.

Reproducer https://godbolt.org/z/3vsnz4hc7
Needed to set up the pass pipeline for the NewPM.

Reviewers: asl

Pull Request: llvm#206616
Standard pass porting.

Reviewers: asl

Pull Request: llvm#206620
Similar to Lanai (f3b58ad) and X86. Use
a separate header to be consistent with the other backends.

Reviewers: asl

Pull Request: llvm#206822
There are some pipelines where we request SlotIndexes, but not
LiveIntervals before running PHIElimination. This happens in the MSP430
pipeline where StackColoring requests SlotIndexes, but nothing requests
LiveIntervals. Before PHIElimination would only update SlotIndexes
through LiveIntervals, which would mean we would fail to preserve
SlotIndexes if it was available but LiveIntervals was not. This would
cause crashes when later passes tried to use SlotIndexes under the
NewPM.

Reviewers: RKSimon, aeubanks, arsenm

Pull Request: llvm#207074
…mbler support (llvm#207097)

Previously we had 3 pseudos:
 vr destination with no mask
 vrnov0 destination with mask
 vr destination with mask and temporary dest

This was intended to prevent a v0 destination with mask and no
temporary. The vrnov0 case confused the near miss code and caused
multiple errors.

This patch reduces to 2 pseudos:
 vr destination with optional mask
 vr destination with mask and pseudo

The v0 destination with mask error is moved to validateInstruction which
allows us to give a better error.
…CEquality. (llvm#207112)

There seem to be some combinations of vector type and scalar type where
a bitcast of constant 0 doesn't get folded or type legalized to a
build_vector of 0 with the vector type we want. I think it's when the
integer type is 2*xlen and <2 x iXLen> is a legal type, but I'm not
sure.

I don't have any other tests to know if adding/improving a DAG combine
is worthwhile so I just did this quick fix at the source.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@vkallesh

vkallesh commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

Closing to re-trigger workflow discovery

@vkallesh vkallesh closed this Jul 2, 2026
@vkallesh

vkallesh commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

Reopening to trigger Multi-Arch CI workflow

@vkallesh vkallesh reopened this Jul 2, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@vkallesh

vkallesh commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

Closing to re-trigger after workflow discovery

@vkallesh vkallesh closed this Jul 2, 2026
@vkallesh

vkallesh commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

Reopening - Multi-Arch CI should now trigger

@vkallesh vkallesh reopened this Jul 2, 2026
@vkallesh vkallesh closed this Jul 4, 2026
@vkallesh
vkallesh deleted the merge-main-into-amd-compiler-vkallesh-test-20260702 branch July 4, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.