Commit Graph
588748 Commits
Author SHA1 Message Date
arti df6a6128d2 tms34010: add M4 zero-extending loads and module-unique private labels 2026-11-12 05:38:20 +00:00
arti 73c85350a4 tms34010: correct M3 encodings and narrow-load docs
get-llvm-version/action.yml (push) Invalid workflow file
require-team-membership/action.yml (push) Invalid workflow file
unprivileged-download-artifact/action.yml (push) Invalid workflow file
upload-release-artifact/action.yml (push) Invalid workflow file
validate-release-version/action.yml (push) Invalid workflow file
2026-11-11 20:30:31 +00:00
arti 1968ccd39b docs: correct M3 milestone wording
unprivileged-download-artifact/action.yml (push) Invalid workflow file
upload-release-artifact/action.yml (push) Invalid workflow file
validate-release-version/action.yml (push) Invalid workflow file
get-llvm-version/action.yml (push) Invalid workflow file
require-team-membership/action.yml (push) Invalid workflow file
2026-11-11 20:06:55 +00:00
arti 8d088c40df docs: M3 branches and Xlib window
validate-release-version/action.yml (push) Invalid workflow file
get-llvm-version/action.yml (push) Invalid workflow file
require-team-membership/action.yml (push) Invalid workflow file
unprivileged-download-artifact/action.yml (push) Invalid workflow file
upload-release-artifact/action.yml (push) Invalid workflow file
2026-11-11 19:56:16 +00:00
arti afb4ad2eef tms34010: allow misaligned loads/stores 2026-11-11 19:45:28 +00:00
arti 05762fceb8 tms34010: add integer comparisons, branches and ALU ops 2026-11-11 18:54:46 +00:00
arti bbc591b77c tms34010: add JAcc branches and GSPA-safe block labels 2026-11-11 18:10:40 +00:00
arti 39512c272d tms34010: fix M2 data widths and FS0 after calls
require-team-membership/action.yml (push) Invalid workflow file
unprivileged-download-artifact/action.yml (push) Invalid workflow file
upload-release-artifact/action.yml (push) Invalid workflow file
validate-release-version/action.yml (push) Invalid workflow file
get-llvm-version/action.yml (push) Invalid workflow file
2026-11-11 17:36:15 +00:00
arti d7317305b9 tms34010: accept returned on call arguments and correct M2 docs
validate-release-version/action.yml (push) Invalid workflow file
get-llvm-version/action.yml (push) Invalid workflow file
require-team-membership/action.yml (push) Invalid workflow file
unprivileged-download-artifact/action.yml (push) Invalid workflow file
upload-release-artifact/action.yml (push) Invalid workflow file
2026-11-11 17:15:44 +00:00
arti 696832dd44 docs: M2 TI ABI and ROM call
upload-release-artifact/action.yml (push) Invalid workflow file
validate-release-version/action.yml (push) Invalid workflow file
get-llvm-version/action.yml (push) Invalid workflow file
require-team-membership/action.yml (push) Invalid workflow file
unprivileged-download-artifact/action.yml (push) Invalid workflow file
2026-11-11 17:05:29 +00:00
arti ce084040aa tms34010: align .data labels before .word/.long values 2026-11-11 16:50:01 +00:00
arti a9c33665ea tms34010: accept the optimizer's returned argument attribute 2026-11-11 16:50:00 +00:00
arti 454fb4ac15 tms34010: emit .data and string literals for GSPA 2026-11-11 16:33:37 +00:00
arti 0512ce9d6b tms34010: TI ABI calls and FS1 fixup 2026-11-11 16:16:41 +00:00
arti a6954059ea tms34010: TI ABI callee frames, arguments and returns 2026-11-11 15:53:28 +00:00
arti 11bdccf7f1 tms34010: replace M1 tests with failing M2 ABI tests 2026-11-11 15:19:27 +00:00
arti be42cd46bc tms34010: add store codegen test and M1 test infra fixes
get-llvm-version/action.yml (push) Invalid workflow file
require-team-membership/action.yml (push) Invalid workflow file
unprivileged-download-artifact/action.yml (push) Invalid workflow file
upload-release-artifact/action.yml (push) Invalid workflow file
validate-release-version/action.yml (push) Invalid workflow file
Test the 32-bit and 16-bit store paths (MOVE ..., 1 / ..., 0) and take
the shared register-file bit from the store data source (src{4}) with
the same-file invariant documented.  Gate the lit directory on the
TMS34010 target being built, and run the no-stack frame test at -O2
with an escaping alloca.
2026-11-11 10:15:27 +00:00
arti 16a4358dd3 tms34010: fail loudly on non-GSPA globals
emitGlobalVariable handled only zero-initialized .bss objects and let
initialized globals, string literals and constant/private data fall
through to the generic ELF .data/.rodata/.asciz printer, which GSPA
rejects.  Reject every non-null initializer and private/constant data
with a fatal error, and add m1-data/m1-string negative tests.
2026-11-11 10:15:23 +00:00
arti 24522ce72f tms34010: reject unsupported M1 signatures and returns
Validate the IR signature before legalization can split i64/aggregate
parameters into i32 pieces, and reject varargs plus sret/byval/inreg/
nest/returned argument flags.  CanLowerReturn no longer returns false
for an unsupported return type (which silently demoted it to sret);
it reports a fatal error instead.  Add negative lit tests at -O0/-O2.
2026-11-11 10:15:19 +00:00
arti 5e35e46b77 docs: M1 backend and test convention
upload-release-artifact/action.yml (push) Invalid workflow file
validate-release-version/action.yml (push) Invalid workflow file
get-llvm-version/action.yml (push) Invalid workflow file
require-team-membership/action.yml (push) Invalid workflow file
unprivileged-download-artifact/action.yml (push) Invalid workflow file
2026-11-11 09:53:23 +00:00
arti 52d3740b62 tms34010: emit GSPA-compatible asm and support -O0 globals
GSPA 2.00 has no .section/.type/.size/.ident/.p2align directives, so
use the base MCAsmInfo and switch sections with bare .text/.data/.bss.
Zero-initialized globals become one .bss line (sizes in bits), and a
global address (including the +bit-addend constant-GEP form) selects to
a single MOVI relocation.

M1 has no stack, so the fast register allocator's spill/reload path
cannot work at -O0; use the greedy allocator there while still skipping
the IR pipeline.  Add m1-o0.ll and m1-global.ll.
2026-11-11 08:31:13 +00:00
arti 916b10bc28 tms34010: add FS0 i16 load-store codegen 2026-11-11 08:05:43 +00:00
arti 39a4666cbe tms34010: add MOVE/MOVB load-store codegen 2026-11-11 07:58:20 +00:00
arti 41d2467953 tms34010: fix CLR encoding to XOR-self form 2026-11-11 07:51:11 +00:00
arti 9d4bbb0f4b tms34010: minimal add codegen with GSPA asm 2026-11-11 07:40:35 +00:00
arti 850da87c0d tms34010: add failing M1 add codegen test 2026-11-11 07:24:37 +00:00
arti 389c194372 TMS34010: add 32-bit bit-addressed target and clang pointer semantics
require-team-membership/action.yml (push) Invalid workflow file
unprivileged-download-artifact/action.yml (push) Invalid workflow file
upload-release-artifact/action.yml (push) Invalid workflow file
validate-release-version/action.yml (push) Invalid workflow file
get-llvm-version/action.yml (push) Invalid workflow file
2026-11-11 06:00:56 +00:00
Yuxuan Chen 392dfff97d [clang] Add release note for EmitDeferred re-emission fix on 23.x 2026-11-02 10:45:15 +00:00
Yuxuan Chen 8db94f8248 [clang][Modules] Keep existing global definition on type mismatch in GetOrCreateLLVMGlobal (#223877)
When a global is requested for definition but a definition with the same
mangled name already exists, return it as is instead of creating a fresh
global and erasing the defined one, even if its type differs from the
requested type.

The type can legitimately differ when the initializer folded to a
different (e.g. anonymous) type, as happens with unions. Erasing the
defined global dangles pointers held by callers, e.g. the
`AssociatedData` of entries in `llvm.global_ctors`, leading to a
use-after-free crash during `EmitCtorList`. This also keeps the
deferred-decls "already emitted" check sound, since it queries with
`IsForDefinition`, which must be non-destructive.

Add a header-unit regression test: an inline variable with an
anonymous-union member, constant-initialized but requiring dynamic
destructor registration, must be emitted exactly once when imported from
header units. The folded initializer has an anonymous type that differs
from the declared type; a second emission used to replace (and erase)
the already-defined global, leaving a dangling pointer in
`llvm.global_ctors` (use-after-free, observable as a crash under ASan).

Assisted-By: Meta Muse 1.3

Co-authored-by: Michael Park <mcypark@gmail.com>
(cherry picked from commit 2a6fdac960de3a6bae854474f12e8f1edfcd9a04)
2026-11-02 10:44:26 +00:00
Mishmish Dev 32e470fa5c [Clang] Don't skip lambda constraints when substituting type constraints (#236425)
This follows up to https://github.com/llvm/llvm-project/pull/207966 in order to transforms type
constraints with a ForConstraintSubstitution flag.

Assisted-by: Codex

(cherry-picked from 93c463319ebcb57e82f0c87c813a9ead536fb952)
2026-10-30 22:06:14 +00:00
Jeremy Morse 20eceee39e Test-behaviour-changes from the cherry-pick of 46965cf.
(Not asserting that this are correct; just that they're what's changed)
2026-10-30 22:03:45 +00:00
Florian Hahn b10c62b2d9 [VPlan] Don't merge allocas across lanes, parts or recipes. (#229929)
Each execution of an alloca creates a new allocation, distinct from the
allocations of all other executions. They must not be merged, either by
CSE or via isUniformAcrossVFsAndUFs.

Update those to explicitly handle Alloca recipes.

Fixes https://github.com/llvm/llvm-project/issues/229389.

PR: https://github.com/llvm/llvm-project/pull/229929
(cherry picked from commit 95ea23b7d5b06c60c513c575577d5b7d0ed15721)
2026-10-30 22:03:27 +00:00
Florian Hahn 86fe084e4c [LV] Add tests showing alloca miscompiles. (#229911)
Tests for https://github.com/llvm/llvm-project/issues/229389.

(cherry picked from commit 81f7e6799becc3cb4b945ee4dc231147f9d36c1b)
2026-10-30 22:03:23 +00:00
Mishmish Dev a738f27371 [Clang] use SubstConstraintExpr instead of SubstExpr in Sema::BuildExprRequirement (#236286) 2026-10-28 19:52:00 +00:00
Brad Smith bdeee0d039 [lldb][OpenBSD] Fix sysctl usage for process info (#122534)
The OpenBSD Host code used FreeBSD-style sysctl MIBs, which don't
match OpenBSD's interface, so process lookups failed.

- GetOpenBSDProcessArgs: use {CTL_KERN, KERN_PROC_ARGS, pid,
  KERN_PROC_ARGV}. OpenBSD returns a NULL-terminated argv array
  whose pointers point into the returned buffer, so iterate it
  directly.
- GetOpenBSDProcessUserAndGroup, FindProcessesImpl: KERN_PROC
  takes a 6-element MIB on OpenBSD, with the kinfo_proc element
  size and element count as the last two entries.

(cherry picked from commit b880f44cbad751b0784a5fbbfbdaacea25e167f8)
2026-10-28 19:50:14 +00:00
Sam ElliottandMitch Briles 99001e3254 [RISCV] Correctly restore libcall CSRs with SCS
Fixes #233318

Before this change, we were restoring some callee-saved registers twice
when using save/restore libcalls with shadow call stack (SCS), and the
second restore was happening after the stack was deallocated using the
wrong register and offset calculation, which was causing lots of access
problems.

The problems were:
- We were using the entire list of Callee Saves rather than just the
  subset that would have been restored by the libcall. This caused
  duplicate restores because of how the CSI subsetting works.
- We were not using the correct offset calculation in
  eliminateFrameIndex, which was causing us to calculate the wrong
  address for the saves/restores.

Assisted-by: AI
Co-authored-by: Mitch Briles <mitchbriles@gmail.com>
2026-10-28 19:49:07 +00:00
Sam Elliott ce24d50695 [RISCV] Ensure Shadow Stack checks correct RA
This primarliy applies to the save-restore case, which was using
`__riscv_restore_<N>` incorrectly, entirely circumventing the software
shadow call stack.

This fix keeps the code size improvements of `__riscv_save_<N>` when
there is a shadow call stack, but it avoids the incorrect use of
`__riscv_restore_<N>`, instead emitting the correct sequence inline.

In the future, when there are better versions of `__riscv_save_<N>` and
`__riscv_restore_<N>` which support the shadow call stack variants (both
hardware and software), then we can revisit this approach and use the
correct pairs in all cases.
2026-10-28 19:49:04 +00:00
DaKnig 5e1a49c5af [SelectionDAG] Don't always use abs(sub) when expanding abdu (#235043)
`TargetLowering::expandABD` expands `abd(a, b)` to `abs(sub(a, b))` when
`willNotOverflowSub` says the sub can't overflow. For `abdu` without
known
non-negative operands, this checks for unsigned overflow, which only
proves
`a >= b (unsigned)`, so `abdu(a, b) == sub(a, b)`. adding abs around it
is wrong, when the
difference is greater than INT_MAX, e.g. `abdu(lshr(x, 1), or(y,
INT_MIN))`.

Keep abs(sub) for the signed check (abds, or abdu with non-negative
operands) and use just sub when abdu and `a >= b`.

Fixes #233087.

(cherry picked from commit f16dbe0ec4b653736148c78bebdefcfe1c88198e)
2026-10-27 19:04:28 +00:00
Fangrui Song ecf9bb207c [Allocator] Cap MinAlign at alignof(max_align_t) (#235373)
alignof(std::max_align_t) is 4 on NetBSD/i386, whose <stddef.h> defines
max_align_t as a union of void *, long double, and long long.

Fix #230782

(cherry picked from commit 0b6b6ed806536c1b170101061ff3eeed91c8f061)
2026-10-27 19:03:38 +00:00
Ramkumar Ramachandra 8ceacf8097 [VPlan] Avoid recursive-fan-out of usesFirstLaneOnly (NFC) (#229130)
This fixes compile-time for the original slow case mentioned in #228403,
without affecting compile-time for smaller cases.

Ref:
https://github.com/llvm/llvm-project/pull/220730#issuecomment-5992802596.
Fixes #228403.

Co-authored-by: Florian Hahn <flo@fhahn.com>
(cherry picked from commit 7a1922aff2176215675b94bb1b3dca331eda2d9a)
2026-10-27 19:01:45 +00:00
Krzysztof Parzyszek 94467edd50 [flang][OpenMP] Fix verification of REF modifier on LINEAR clause (#232367)
The OpenMP spec has a bug: the restriction should read
> If linear-modifier is ref, list items must not be polymorphic variables,
> assumed-shape arrays, or variables with the ALLOCATABLE attribute.

---------

Co-authored-by: Markus Mützel <markus.muetzel@gmx.de>
(cherry picked from commit 53d096bbf31d12fddbbe2508b7f80bab9628430d)
2026-10-27 19:00:42 +00:00
Brad Smith 093145f1e2 [clang][Driver] Fix libc++ include path on OpenBSD (#212979)
`clang++` defaults to `-stdlib=libc++` on OpenBSD. When building with both
`clang` and `libcxx` included, the freshly built `clang++` uses the system
version of the `libc++` headers. However, this is from the bundled `libc++`
22.1.8, thus inconsistent with the `libc++` being built.

OpenBSD has its own version of addLibCxxIncludePaths which just includes
`/usr/include/c++/v1`.

This patch removes OpenBSD::addLibCxxIncludePaths in favour of the generic
version in `Gnu.cpp`.

(cherry picked from commit 1204f6b4e9d6bef8ec319d121942dca5cbf94a26)
2026-10-27 18:59:18 +00:00
Tavva Dinesh Reddy 7ddf6cc19e [TailCallElim] Drop poison-generating attributes and metadata from accumulator (#233527)
When accumulator recursion elimination rewrites the accumulator
instruction to use the accumulator PHI (and clones it at each return in
`cleanupAndFinalize()`), its operands change, so poison-generating
annotations derived from the original operands may no longer hold. Only
flags were dropped so far (#200624); return attributes like `range()`
and metadata like `!range` were kept.

In the reproducer from the issue, `umax(%r, 1)` carries `range(i8 1,
3)`, and the per-return copy `umax(%accumulator.tr, %k)` kept it
although it can return 0, so `-O2` inferred `range(i8 1, 3)` for the
whole function (miscompiling the Rust code linked in the issue).

This patch uses `dropPoisonGeneratingAnnotations()` instead of
`dropPoisonGeneratingFlags()`.

Fixes #233085

(cherry picked from commit 21c1bcd7059ca56dee6bc377e60a06a3b18a1d69)
2026-10-27 18:58:14 +00:00
dyslexicsteak 395ba2c4d2 [CodeGenPrepare] Drop poison-generating flags on extensions in optimizeExtUses (#234134)
`optimizeExtUses` rewrites uses of an extension's source in other blocks
to read `trunc` of the extension, which is only correct where the
extension isn't `poison`. A `zext nneg` can be valid only where it was
originally used, like behind a check that its source isn't negative. If
that check is one of the rewritten uses, it ends up reading `poison`,
and on `x86_64-pc-windows-msvc`, InstSimplify in WinEHPrepare's cleanup
folds it to true and causes a miscompile.

Drop the extension's poison-generating flags once a use has been
rewritten, like #72103 and #90382 did for similar cases in
`CodeGenPrepare`.

Fixes #234098.

(cherry picked from commit 93fccabb4ebc82695475eaaa279ea5fbb2265450)
2026-10-23 06:53:53 +00:00
Florian Hahn 5c71313dd9 [LoopUnroll] Invalidate epilogue exit phis with new predecessor. (#234202)
Adding a new incoming value the to LCSSA phi in the exit block requires
invalidating SCEV for the phi.

Add missing forgetLcssaPhiWithNewPredecessor, like ConnectProlog already
does.

Fixes https://github.com/llvm/llvm-project/issues/231756

PR: https://github.com/llvm/llvm-project/pull/234202
(cherry picked from commit 1782f9b2cef910440a06240f3bcc638bef981584)
2026-10-23 06:53:14 +00:00
Folkert de Vries f8bd9523ff [LoongArch] fix more sitofp missing instruction issues (#234143)
Turns out https://github.com/llvm/llvm-project/issues/228894 /
https://github.com/llvm/llvm-project/pull/228896 was not sufficient,
there are still isel issues with this conversion:

- https://godbolt.org/z/arTaEhKsT
- https://godbolt.org/z/nGh63Kvo6

(cherry picked from commit ee216ff7ed6326989dfbd8f206342657aa1fda84)
2026-10-23 06:52:28 +00:00
Nerixyz 1f43a9242e [debuginfod] Abort cached file stream if request fails (#232038)
When an HTTP request fails while it already received some data, the
cached file stream is never committed. Destroying it in that state
raises a fatal error, crashing the program (see #184728).

This PR adds an `abort` method that should be called in this situation
before destroying the stream. For the default implementation, only the
output stream is closed. For the `CacheStream` in `llvm::localCache`,
the temporary file is discarded as well.

The test is based on David's reproducer. Since WinHttp seems to discard
the content-length header, I switched to timing out the response
instead.

Fixes #184728. This is still a bug for the symstore locator in lldb, but
I'll fix that in a followup.

fix: disable test partial-response.test on system-windows
2026-10-23 06:50:42 +00:00
Krzysztof Parzyszek 2cc5b8ca55 [flang][OpenMP] Ignore DECLARE_SIMD and warn about missing implementa… (#232712)
…tion

Currently DECLARE_SIMD emits a "not yet implemented" error in the MLIR
to LLVM IR translation.

DECLARE_SIMD is a hint to the compiler and ignoring it is technically
speaking a conforming implementation (although obviously not desirable).
Do not abort compilation when DECLARE_SIMD is encountered, but emit a
warning that it's currently ignored.

(cherry picked from commit 5ca62fdee645ec253263e41a45fe626c6b66be22)

Fixes: https://github.com/llvm/llvm-project/issues/234108
2026-10-23 06:48:25 +00:00
Florian Hahn fde947fd58 [VPlan] Split legalizeAndOptimizeIVs in 2 phases. (#217765)
Split the transform into 2 phases:

1. narrow all users of all IVs
2. replace wide IVs if all users are scalar.

Together with removing the old, wide recipes, this allows us to catch
slightly more cases.

PR: https://github.com/llvm/llvm-project/pull/217765

(cherry picked from commit 932f5d22df7775f7cb65befd62053c0e93448959)
(cherry picked from commit a3ac001f673a87a014ecd6bf7ca11cc8b1cb576d)
2026-10-23 06:45:47 +00:00
Louis Dionne b2a8cf23b9 [libc++][ci] Retarget the ARM BuildKite runners (#224107)
I enabled agent clusters in BuildKite since unclustered agents are not
supported anymore. As part of that, I created a new libcxx-builders-arm
queue to replace the existing queue. This patch switches the pipeline
definition so that new jobs start targeting the new queue with clustered
agents.

(cherry picked from commit 01edf187213105e35db8aef724a63f86241b6bd4)
2026-10-23 05:46:06 +00:00