[AMDGPU][Docs] Memory Model: Refactor location-order to cover reads (#213044)
This shouldn't change anything semantically, only make the spec
(a) closer to the Vulkan spec, which includes reads in their location-ordered
relation: https://docs.vulkan.org/spec/latest/appendices/memorymodel.html#memory-model-location-ordered
(b) more uniform: this way, the may-see constraints are the same as the vanilla
LLVM constraints, only with all occurrences of "happens-before" replaced by
"location-ordered before".
cad/OrcaSlicer: Fix 32-bit build
LayerResult's second field is typed size_t, so std::numeric_limits::max
should also use size_t and not something related to coordinates for the
layer_id.
Reported by: pkg-fallout
Approved by: arrowd (co-mentor)
(cherry picked from commit b403418f4721af9ec4b2158539536e19ee564150)
[Sema][Serialization] Emit unused local typedefs in a deterministic order (#209639)
Sema::UnusedLocalTypedefNameCandidates is populated while iterating a Scope's
DeclsInScope, which is a SmallPtrSet whose iteration order depends on pointer
values and is therefore not stable across runs. The candidates are serialized
into the AST file -- both to assign declaration IDs and to write the
UNUSED_LOCAL_TYPEDEF_NAME_CANDIDATES record -- and are also used to emit the
deferred -Wunused-local-typedef warnings, so neither the emitted PCH/AST file
nor the diagnostics were reproducible. With deterministic compilation caching
this surfaces as a "cache poisoned" error, because two builds of the same PCH
produce different bytes.
Sort the candidates by source location at the point they are consumed, via
Sema::getSortedUnusedLocalTypedefNameCandidates(), so that both the diagnostics
and the serialized declarations are deterministic.
[flang][CodeGen] Replace fir.select* FIR-to-LLVM patterns with stubs that emit conversion errors (#212978)
`fir.select`, `fir.select_case`, `fir.select_rank`, and
`fir.select_type` are lowered to cf.* earlier in the pipeline
(`--fir-select-ops-conversion` and `--fir-polymorphic-op`). Their
FIR-to-LLVM conversion patterns are dead in a correct pipeline. Replace
them with a single templated stub
`SelectShouldHaveBeenConvertedStub<OP>` that emits `"'fir.<op>' op
should have already been converted"` and fails legalization, so running
`--fir-to-llvm-ir` standalone on stale IR reports a clear diagnostic
instead of "unable to legalize".
`Fir/convert-to-llvm.fir`'s six select* test blocks are removed (the
lowering no longer runs; CF-level coverage lives in
`Fir/SelectOpsConversion/`). `Fir/convert-to-llvm-invalid.fir` gains a
stub-error test per op. `Fir/Todo/select_case_with_character.fir` is
retargeted to check the equivalent diagnostic now emitted by
`--fir-select-ops-conversion`.
[6 lines not shown]
[ubsan] Test CFI summaries globally (#206434)
Always enable report_error_type=1 and print_summary=1 for CFI tests, and
update existing tests to check for cfi-bad-type. This allows us to
verify summary output comprehensively across the test suite.
This is a prerequisite for the change to the UBSan summary for CFI in
https://github.com/llvm/llvm-project/pull/203341.
Assisted-by: Automated tooling, human reviewed.
AMDGPU: Add missing mqsad-pk-insts to gfx13 frontend feature map
fillAMDGCNFeatureMap omitted mqsad-pk-insts for gfx1310/gfx13-generic, so
clang wrongly rejected __builtin_amdgcn_mqsad_pk_u16_u8 on those targets
even though the backend enables the feature. Add it to the gfx13 case.
Co-authored-by: Claude (Claude-Opus-4.8)
net-mgmt/netbox: Fix build after 3496c09fda1b
* Switch to the recently created py-social-auth-core4 port, because
NetBox is not compatible with newer versions of py-social-auth-core
due to several breaking changes.
* Bump PORTREVISION due dependency change.
PR: 297152
www/py-dj60-social-auth-app-django: Fix build after 3496c09fda1b
* Although there are already newer releases that are compatible with
py-social-auth-core >= 5, they also introduce quite a few breaking
changes along with py-social-auth-core 4.9.0+, so updating the port
is not an option at this time.
Therefore, switch to the recently created py-social-auth-core4 port
for now to fix the fallout and avoid regressions.
* Bump PORTREVISION due dependency change.
PR: 297152
Reported by: Einar Bjarni Halldórsson, pkg-fallout
www/py-social-auth-app-django: Fix build after 3496c09fda1b
* Although there are already newer releases that are compatible with
py-social-auth-core >= 5, they also introduce quite a few breaking
changes along with py-social-auth-core 4.9.0+, so updating the port
is not an option at this time.
Therefore, switch to the recently created py-social-auth-core4 port
for now to fix the fallout and avoid regressions.
* Bump PORTREVISION due dependency change.
PR: 297152
Reported by: pkg-fallout
security/py-social-auth-core4: New port
This is the core component of the python-social-auth ecosystem, it
implements the common interface to define new authentication backends
to third parties services, implement integrations with web frameworks
and storage solutions.
PR: 297152
[X86] Fix miscompile of fptosi.sat.iN.f16 for NaN under avx512fp16 (#210556)
`X86TargetLowering::LowerFP_TO_INT_SAT` incorrectly lowered
`llvm.fptosi.sat.iN.f16` for N = 13, 14, 15, 16 under `avx512fp16`
codegen: NaN inputs produced the destination type's minimum value
instead of the 0 that the intrinsic's documented semantics require.
Vector forms that scalarize through this lowering are affected under
the same condition, applied per element. See the third commit message
for the full root-cause analysis and fix rationale.
---
Assisted-by: Claude (Anthropic)
Assisted-by: Codex (OpenAI)
The investigation, root-cause analysis, fix, and tests in this PR were
developed with substantial AI assistance (Claude), including four
independent AI-assisted review rounds (Codex). I reviewed and take
responsibility for all code, analysis, and claims in this PR, and can
answer questions about the reasoning above.
[VPlan] Set correct VPIRFlags for FP selects when sinking stores. (#212973)
Selects of floats carry fast-math flags. Update getDefaultFlags to take
the result type and use it to handle selects. I am planning on extending
this to other similar opcodes, including PHIs.
Then update sinkPredicatedStores to pass through the correct default
flags.
This fixes a crash in cse when intersecting common metadata.
Fixes https://github.com/llvm/llvm-project/issues/212811.
PR: https://github.com/llvm/llvm-project/pull/212973
(cherry picked from commit 40e33eb35417f565e2ed8a6c0dba63cbd618a926)
[tsan] Fix buildgo.sh on FreeBSD/NetBSD (#213047)
This patch fixes the remaining compile errors when running `ninja
check-all` on FreeBSD and NetBSD:
- `sanitizer_linux.cpp` doesn't compile on NetBSD, so this patch adds a
cast:
```
sanitizer_common/sanitizer_linux.cpp:2492:10: error: format specifies
type 'unsigned long long' but the argument has type '__greg_t' (aka
'unsigned long') [-Werror,-Wformat]
```
- `tsan_interface_atomic.cpp` doesn't compile on both FreeBSD and
NetBSD, so this patch disables the warning:
```
tsan_interface_atomic.cpp:353:12: error: unused function template
'NoTsanAtomic' [-Werror,-Wunused-template]
tsan_interface_atomic.cpp:358:12: error: unused function template
[25 lines not shown]
[VPlan] Fix optimizeFindIVReductions not negating condition of blend (#213050)
Fixes #212993
#194729 made the m_Select a m_SelectLike, so FindLastSelect could now be
a blend. However we were checking the first operand to see if the Cond
needed inverted. A select has `select %cond, %true, %false`, a blend is
`blend %false, %cond, %true`, so we were failing to negate the
condition.
(cherry picked from commit 4f705acc388ab2c627fb263d89d1d60468f8a97b)
[RISCV] Fix crash in convertToVLMAX when AVL is an ADDI of a frame index (#212923)
`getConstant()` recognizes an AVL that is an immediate by checking
the opcode is `ADDI`, then reading the second operand and checking
if it is `X0`. However the second operand may be a frame index and
`getReg()` asserts with "This is not a register operand!".
We should guard the register access with `isReg()` before comparing
against `X0`.
Fixes #212797.
(cherry picked from commit ef7f2f611993a4bc59e181d2bf8fc6269d7e1c7d)
[Mips] Fix Clang crashes when assembling MIPS div/rem with register-name symbol as divisor (#200354)
Add check before getimm().
Fix #185363.
(cherry picked from commit 2b45696fcafc0c92ea0ad73483b1e175c97c834a)
[ARM] Exclude TLS symbols from the .reloc/R_ARM_REL32 path (#212549)
The .reloc branch in emitMachineConstantPoolValue fired for any
isWeakForLinker() + isDSOLocal() symbol, including TLS (thread_local)
weak symbols. R_ARM_REL32 is wrong for TLS: TLS symbols need
TLS-specific relocations (R_ARM_TLS_GD32 etc.). Using R_ARM_REL32 for a
TLS symbol produces a wrong address at runtime.
This broke the 2-stage ARM 32-bit buildbots: stage 1 (with the .reloc
branch) miscompiled stage 2's BPF codegen (BTFDebug.cpp references
llvm::sys::sandbox::Enabled, an inline thread_local weak variable),
causing a SIGSEGV in the BPF Assembly Printer.
Add a regression test (tls_weak_var in elf-preemption.ll) verifying that
TLS weak symbols get TLSGD/TPOFF, not R_ARM_REL32.
Fix #212545
(cherry picked from commit f4382bedc245a22ea7c354d08eb13543166a5f0d)
[libc++][utils] Fix LIT `%if` substitution support (#209358)
Update the applySubstitutions call in `libcxx/utils/libcxx/test/format.py` to match the
change to `llvm/utils/lit/lit/TestRunner.py` done in 1041a9642ba0.
(cherry picked from commit a8617034c4a7cc733676a31b736d3118fec34259)