LLVM/project aabe42e — llvm/test/CodeGen/RISCV/rvv vwsub-sdnode.ll vwadd-sdnode.ll

[RISCV] Generalize combineBinOpOfZExt to allow sext (#230472)

This combine narrows binary ops so they're performed at a smaller LMUL.
The combine currently only handles cases where both operands are zext,
but we can also allow sext.

If any operand is sexted then we need to sext the result as the sign bit
may not be zero.

We can't handle udiv + urem if either of the operands are sext, since
sign extending a narrower udiv/urem gives incorrect results. E.g. `udiv
(sext (i8 -1) to i32), (zext (i8 2) to i32)`:
    
- At i32: `udiv 0xffffffff, 2 = 0x7fffffff`
- Narrowed to i16: `sext (udiv 0xffff, 2) to i32 = sext 0x7fff to i32 =
0x00007ffff`
DeltaFile
+340-285llvm/test/CodeGen/RISCV/rvv/fixed-vectors-zvdot4a8i.ll
+396-0llvm/test/CodeGen/RISCV/rvv/binop-sext.ll
+112-144llvm/test/CodeGen/RISCV/rvv/vwmul-sdnode.ll
+93-96llvm/test/CodeGen/RISCV/rvv/zvdot4a8i-sdnode.ll
+56-72llvm/test/CodeGen/RISCV/rvv/vwsub-sdnode.ll
+56-72llvm/test/CodeGen/RISCV/rvv/vwadd-sdnode.ll
+1,053-6698 files not shown
+1,148-76014 files

LLVM/project d4a8fb3 — llvm/include/llvm/Analysis IVDescriptors.h, llvm/lib/Transforms/Vectorize LoopVectorizationPlanner.cpp LoopVectorize.cpp

[LV] Improve code around inductions, reductions (NFC) (#230476)

Use DenseMap::{keys,values} to improve code around getInductionVars,
getReductionVars.
DeltaFile
+22-21llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+6-14llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+3-2llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.cpp
+1-1llvm/include/llvm/Analysis/IVDescriptors.h
+32-384 files

LLVM/project 1be9bdf — llvm/test/MC/RISCV option-invalid.s option-arch.s

[RISC-V][MC] Add test for C/Zce implication in .option arch (#230298)

Add MC test coverage for 80f1acc631ca
(https://github.com/llvm/llvm-project/pull/229905). Previously, with
`rv32i` running `.option arch, +zca; .option arch, -zca` resulted in
`error: can't disable zca extension; c extension requires zca extension`,
`.option arch, +zca, +zcb, +zcmp, +zcmt; .option arch, -zcmt` resulted
in `error: can't disable zcmt extension; zce extension requires zcmt extension`,
and `.option arch, +zca, +zclsd; .option arch, +f` resulted in
`error: 'zclsd' and 'zcf' extensions are incompatible`.

This commit was created with the help of AI tools

Pull-Request: https://github.com/llvm/llvm-project/pull/230298
DeltaFile
+25-0llvm/test/MC/RISCV/option-arch.s
+14-0llvm/test/MC/RISCV/option-invalid.s
+39-02 files

LLVM/project 2508609 — llvm/lib/CodeGen/SelectionDAG LegalizeTypes.h SelectionDAG.cpp

Canonicalize in getNode
DeltaFile
+0-9llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+6-0llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+0-1llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
+6-103 files

LLVM/project 64bcef5 — flang/docs F202X.md Extensions.md, flang/lib/Evaluate intrinsics.cpp

[flang] Classify intrinsic functions as SIMPLE (#223160)

Classify standard intrinsic functions as `SIMPLE` per Fortran 2023 16.1(2).

This change also:
- Classifies extensions as `SIMPLE` where applicable
- Documents the `SIMPLE` and non-`SIMPLE` classifications of extensions
in Extensions.md
- Updates procedure-interface tests affected by the new `SIMPLE`
classification
- Updates F202X.md to reflect the current `SIMPLE` implementation status

Part of the `SIMPLE` procedure support tracked in #221457.
DeltaFile
+47-0flang/test/Semantics/simple-intrinsic-functions.f90
+19-3flang/lib/Evaluate/intrinsics.cpp
+11-0flang/test/Semantics/null-mold-pure-simple.f90
+8-2flang/docs/F202X.md
+10-0flang/docs/Extensions.md
+4-4flang/test/Semantics/intrinsics03.f90
+99-93 files not shown
+111-149 files

LLVM/project 05b62b2 — lldb/docs/resources dil.md

[LLDB] Add user documentation for DIL. (#228275)

Add documentation for users (and programmers) about what DIL is, what it
does, and how it can be controlled.
DeltaFile
+330-0lldb/docs/resources/dil.md
+330-01 files

LLVM/project 0b84e68 — llvm/lib/Support UnicodeNameToCodepointGenerated.cpp, llvm/test/CodeGen/AMDGPU fcmp.f16.ll load-global-i16.ll

Merge remote-tracking branch 'origin/main' into vplan-based-stride-mv-rt-guard

# Conflicts:
#       llvm/test/Transforms/LoopVectorize/vplan-based-stride-mv.ll
DeltaFile
+23,347-23,371llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+5,287-5,656llvm/test/CodeGen/AMDGPU/load-global-i8.ll
+2,827-5,340llvm/test/CodeGen/AMDGPU/fptrunc.f16.ll
+3,366-3,401llvm/test/CodeGen/AMDGPU/load-global-i16.ll
+3,103-3,156llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-private.mir
+1,450-4,799llvm/test/CodeGen/AMDGPU/fcmp.f16.ll
+39,380-45,7234,358 files not shown
+312,379-142,4594,364 files

LLVM/project 1b63043 — compiler-rt/lib/asan asan_rtl.cpp asan_mapping.h

[ASan][Darwin] Support gapless shadow layout for iOS 27.0 (#217530)

This is the second PR in a series that upstreams support for iOS 27.0
(see #217527 for the first).

When the shadow can be placed entirely above app memory (as on iOS 27),
there is no need to split shadow into low/high halves with a middle gap.
This PR adopts a "gapless" layout in ASAN, in which all of application
memory is in `[kLowMemBeg, kLowMemEnd]` and shadow is `[kLowShadowBeg,
kLowShadowEnd]`. The "high" region is unnecessary and thus unused
(because of the way it is defined, `kHighMemBeg > kHighMemEnd` in this
new layout, which conveniently means that `AddrIsInHighMem(p)` is always
false) -- this is a bit jank and unintuitive, but it keeps the diff
between iOS and other platforms relatively small.

- Add kGaplessShadow (Darwin-only) to detect this configuration.
- Teach `InitializeShadowMemory` to reserve one contiguous shadow region
and protect only the shadow-of-shadow when kGaplessShadow is true
- Update PrintAddressSpaceLayout to print the single-region layout.

rdar://167657399
DeltaFile
+39-1compiler-rt/lib/asan/asan_shadow_setup.cpp
+9-0compiler-rt/lib/asan/asan_mapping.h
+1-0compiler-rt/lib/asan/asan_rtl.cpp
+49-13 files

LLVM/project 8071090 — compiler-rt/lib/sanitizer_common sanitizer_common.h sanitizer_platform.h, compiler-rt/test/asan/TestCases/Darwin sandbox-vm-region-recurse.cpp

[sanitizer_common][Darwin] Add debug memory region support for iOS 27.0 (#217527)

Replaces #216885 (but not from a fork so I can use stacked PRs)

iOS 27.0 bumps the address space from 36 to 39 bits on some devices, and
reserves address space for sanitizer shadow memory which is unavailable
to normal applications. This is the first of a series of PRs which
upstreams support for this configuration.

- Add `SANITIZER_IOSDEVICE` and `SANITIZER_EMBEDDED_VM_LAYOUT` macros
for physical devices / devices that support the 39-bit layout; bump
Darwin iOS/ARM64 `SANITIZER_MMAP_RANGE_SIZE` from 36 to 39 bits on
physical devices.
- Add `ActivateDebugMemory` / `DebugMemoryActive` and tag mmap
allocations above `DARWIN_DEBUG_MEMORY_START` with `VM_MEMORY_DEBUG`
when using the debug range; verify returned addresses fall within the
expected range.
- Replace `GetAppReservedRanges` with `GetAppRanges`, populated from
sysctls (on supported devices) which report what ranges are available to

    [11 lines not shown]
DeltaFile
+333-68compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
+15-15compiler-rt/lib/sanitizer_common/sanitizer_win.cpp
+19-1compiler-rt/lib/sanitizer_common/sanitizer_mac.h
+6-2compiler-rt/lib/sanitizer_common/sanitizer_platform.h
+0-4compiler-rt/lib/sanitizer_common/sanitizer_common.h
+1-1compiler-rt/test/asan/TestCases/Darwin/sandbox-vm-region-recurse.cpp
+374-916 files

LLVM/project 276fec2 — clang/test/CodeGenHIP amdgpu-barrier-type.hip, clang/test/SemaCXX amdgpu-barrier.cpp

[AMDGPU] Make named barrier type 1 byte to fix barrier IDs of array elements (#230516)

Since #209746, a pointer in the barrier address space (15) is the
barrier ID, and the backend reads the ID as `ptr & 0x3F`. But
`target("amdgcn.named.barrier", 0)` is still 16 bytes, so GEP to element
`i` of a barrier array adds `16 * i` to the barrier ID. For example, if
`@bars` gets barrier ID 1, `&bars[2]` selects barrier 33 instead of 3.

This PR changes the type to 1 byte, so one array element is one barrier
ID.

Fixes LCOMPILER-2898.
DeltaFile
+10-78llvm/test/CodeGen/AMDGPU/s-barrier-signal-var-gep.ll
+14-22llvm/test/CodeGen/AMDGPU/s-barrier-array-index.ll
+5-5clang/test/CodeGenHIP/amdgpu-barrier-type.hip
+2-4llvm/lib/IR/Type.cpp
+2-2clang/test/SemaHIP/amdgpu-barrier.hip
+2-2clang/test/SemaCXX/amdgpu-barrier.cpp
+35-1134 files not shown
+39-11710 files

LLVM/project 8d53457 — llvm/lib/Transforms/HipStdPar HipStdPar.cpp, llvm/test/Transforms/HipStdPar math-fixup-libm-decls.ll

HipStdPar: Don't reprocess math library functions as intrinsics

All uses were already replaced so this only inserted unused nonsense
declarations by replacing the first 4 characters of the function name
with "__hipstdpar". For example acosh would be replaced with
__hipstdparh.

Co-authored-by: Claude <noreply at anthropic.com>
DeltaFile
+25-0llvm/test/Transforms/HipStdPar/math-fixup-libm-decls.ll
+1-1llvm/lib/Transforms/HipStdPar/HipStdPar.cpp
+26-12 files

LLVM/project 891b233 — llvm/lib/Target/AMDGPU GCNHazardRecognizer.cpp, llvm/test/CodeGen/AMDGPU wmma-coexecution-valu-hazards.mir

[AMDGPU] Fix missed WMMA C-operand co-exec hazard

The gfx1250 WMMA co-execution hazard check treats only A, B and the
SWMMAC index as registers the in-flight MMA still reads. C (src2 of a
non-SWMMAC WMMA) is missing, so a VALU scheduled into the MMA's shadow
can clobber C and the MMA consumes the new value.

This is latent while C is tied to vdst, since the existing D check then
covers it. It miscompiles where the tie does not hold: for
v_wmma_bf16f32_16x16x32_bf16, whose D is narrower than C, and for the
_threeaddr form of any WMMA.
DeltaFile
+171-2llvm/test/CodeGen/AMDGPU/wmma-coexecution-valu-hazards.mir
+3-4llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
+174-62 files

LLVM/project a270dc7 — openmp/libompd/gdb-plugin CMakeLists.txt

[OpenMP] Do not reinstall ompd modules in multilibs (#230261)

Summary:
Mulitlibs build the same library with different options, usually placed
into another directory. These libraries do not follow that scheme but
have no real utilitiy in a multilib so just exclude them.
DeltaFile
+5-3openmp/libompd/gdb-plugin/CMakeLists.txt
+5-31 files

LLVM/project 5cf3197 — clang/docs LanguageExtensions.md, clang/include/clang/Options Options.td

Enable driver changes for fexec-charset
DeltaFile
+14-6clang/lib/Driver/ToolChains/Clang.cpp
+14-4clang/include/clang/Options/Options.td
+11-3clang/test/Driver/clang_f_opts.c
+10-0llvm/lib/Support/TextEncoding.cpp
+4-3clang/test/Driver/cl-options.c
+3-3clang/docs/LanguageExtensions.md
+56-193 files not shown
+60-199 files

LLVM/project 2fb51dc — clang/include/clang/Options Options.td, clang/lib/Driver/ToolChains Clang.cpp

address comments
DeltaFile
+3-3clang/include/clang/Options/Options.td
+1-1clang/lib/Driver/ToolChains/Clang.cpp
+4-42 files

LLVM/project dd61f5e — clang-tools-extra/clang-tidy/utils FormatStringConverter.cpp, clang/lib/AST PrintfFormatString.cpp ScanfFormatString.cpp

Add isNoop to avoid conversion code in ActOnGCCAsmStmtString
DeltaFile
+41-31clang/lib/AST/FormatStringParsing.h
+31-31clang/lib/AST/FormatString.cpp
+20-20clang/lib/Sema/SemaChecking.cpp
+14-24clang/lib/AST/ScanfFormatString.cpp
+4-22clang/lib/AST/PrintfFormatString.cpp
+4-5clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp
+114-1336 files not shown
+127-13912 files

LLVM/project eb62ff4 — clang/include/clang/Basic TargetInfo.h, clang/lib/AST ASTContext.cpp

convert to exec-charset inside getPredefinedStringLiteralFromCache, test __builtin_FILE()
DeltaFile
+10-0clang/lib/AST/ASTContext.cpp
+3-1clang/test/CodeGen/systemz-charset.cpp
+2-1clang/lib/Lex/TextEncoding.cpp
+3-0clang/lib/Basic/TargetInfo.cpp
+2-0clang/include/clang/Basic/TargetInfo.h
+20-25 files

LLVM/project bb854ae — clang/lib/AST ASTContext.cpp, clang/lib/Lex TextEncoding.cpp

Convert the key before cache lookup to prevent encoding differences
DeltaFile
+9-9clang/lib/AST/ASTContext.cpp
+3-2clang/lib/Lex/TextEncoding.cpp
+12-112 files

LLVM/project 1f8732c — clang/lib/AST FormatString.cpp ScanfFormatString.cpp

change char literals to u8'' to preserve behaviour in the case the
compiler is compiled with a different fexec-charset
DeltaFile
+44-44clang/lib/AST/PrintfFormatString.cpp
+28-28clang/lib/AST/ScanfFormatString.cpp
+28-27clang/lib/AST/FormatString.cpp
+100-993 files

LLVM/project 3a89742 — clang/include/clang/AST FormatString.h, clang/lib/AST ScanfFormatString.cpp PrintfFormatString.cpp

do not convert character by character
DeltaFile
+34-31clang/lib/AST/FormatString.cpp
+28-26clang/lib/AST/FormatStringParsing.h
+20-18clang/lib/Sema/SemaChecking.cpp
+8-5clang/lib/AST/PrintfFormatString.cpp
+4-4clang/lib/AST/ScanfFormatString.cpp
+2-2clang/include/clang/AST/FormatString.h
+96-866 files

LLVM/project a10a33f — clang/lib/AST ScanfFormatString.cpp PrintfFormatString.cpp, llvm/include/llvm/Support TextEncoding.h

rename char conversion function to convertBasicChar
DeltaFile
+18-17clang/lib/AST/FormatString.cpp
+12-12clang/lib/AST/PrintfFormatString.cpp
+3-5clang/lib/AST/ScanfFormatString.cpp
+3-1llvm/include/llvm/Support/TextEncoding.h
+36-354 files

LLVM/project abb565e — clang/lib/AST FormatStringParsing.h ScanfFormatString.cpp, clang/lib/Sema SemaChecking.cpp

Add format string handling
DeltaFile
+82-39clang/lib/AST/PrintfFormatString.cpp
+46-40clang/lib/AST/FormatString.cpp
+41-24clang/lib/Sema/SemaChecking.cpp
+28-14clang/lib/AST/ScanfFormatString.cpp
+25-11clang/lib/AST/FormatStringParsing.h
+19-0llvm/lib/Support/TextEncoding.cpp
+241-1289 files not shown
+272-14615 files

LLVM/project 0668818 — clang/docs LanguageExtensions.md

Add some documentation
DeltaFile
+47-0clang/docs/LanguageExtensions.md
+47-01 files

LLVM/project 7adba29 — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 split-node-reduction-resize.ll

[SLP]Fix crash on split reduction root cast cost

Split roots keep their operands in the combined sub-nodes. The operand
lookup on the root asserts, so leave the context hint unset for them.

Fixes #230407

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/230597
DeltaFile
+55-0llvm/test/Transforms/SLPVectorizer/X86/split-node-reduction-resize.ll
+4-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+59-02 files

LLVM/project 4185a24 — offload/libomptarget OffloadRTL.cpp

Update offload/libomptarget/OffloadRTL.cpp

Co-authored-by: Kevin Sala Penades <salapenades1 at llnl.gov>
DeltaFile
+1-1offload/libomptarget/OffloadRTL.cpp
+1-11 files

LLVM/project 08315bf — clang/lib/AST ExprConstant.cpp, clang/lib/AST/ByteCode Compiler.cpp

[clang][Sema] Store the evaluated elements of file-scope compound literals (#221390)

Fixes #212106

A file-scope compound literal has to be constant-initialized, and Sema
checks each element in a constant context, where `__builtin_constant_p`
of something it cannot fold simply yields 0. It wrapped each element in
a `ConstantExpr` but never stored the value, so CodeGen evaluated the
element a second time under whatever context it happened to be in. When
the literal's address is taken by a global that needs dynamic
initialization, that context is non-constant, `__builtin_constant_p`
refuses to fold, and `tryEmitGlobalCompoundLiteral` asserts.

Sema now evaluates each element once, as the initializer of a static
object through `EvaluateAsConstantExpr` with a new
`ConstantExprKind::Initializer`, and stores the result in the wrapper it
already creates. CodeGen emits the stored value and no longer
re-evaluates the element. The structural `isConstantInitializer` check
is no longer used for compound literals, and the constant evaluator and
CodeGen now see the same contents for the literal.
DeltaFile
+79-39clang/lib/AST/ByteCode/Compiler.cpp
+93-0clang/test/CodeGenCXX/GH212106.cpp
+45-20clang/lib/Sema/SemaExpr.cpp
+24-0clang/test/SemaCXX/compound-literal.cpp
+4-13clang/test/AST/static-compound-literals-crash.cpp
+9-7clang/lib/AST/ExprConstant.cpp
+254-797 files not shown
+276-8313 files

LLVM/project 0d85e1f — llvm/test/TableGen RuntimeLibcallEmitter-bad-system-library-entry-error.td RuntimeLibcallEmitter-library-dispatch.td, llvm/utils/TableGen/Basic RuntimeLibcallsEmitter.cpp

RuntimeLibcalls: Require system library members to be libraries

Every SystemRuntimeLibrary now lists only LibcallLibrary and LibraryRef
members, so the inline path that expanded unhomed RuntimeLibcallImpl members
directly into the system's block, including its SystemAvailableImpls
bitset, is dead. Remove it, and error on any member that is not a
library. The generated RuntimeLibcalls.inc is unchanged.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+118-108llvm/test/TableGen/RuntimeLibcallEmitter.td
+94-103llvm/test/TableGen/RuntimeLibcallEmitter-calling-conv.td
+18-117llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
+12-50llvm/test/TableGen/RuntimeLibcallEmitter-multiple-impls.td
+3-21llvm/test/TableGen/RuntimeLibcallEmitter-library-dispatch.td
+15-6llvm/test/TableGen/RuntimeLibcallEmitter-bad-system-library-entry-error.td
+260-4056 files not shown
+278-41612 files

LLVM/project d8c6a3e — llvm/include/llvm/IR RuntimeLibcalls.td

RuntimeLibcalls: Remove the Default* libcall lists

Every system library now lists only LibcallLibrary members, so nothing
references DefaultRuntimeLibcallImpls. arm64ec's '#'-prefixed set was
still derived from the whole default list minus the width slices and
the Windows exclusions. Build it from the compiler-rt, libm and libc
slices instead, still omitting the calls the Windows runtime lacks.
Take AArch64's fp128 long double calls from the libm slice, and delete
the remaining default and Windows base lists.

The generated tables are unchanged.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+9-66llvm/include/llvm/IR/RuntimeLibcalls.td
+9-661 files

LLVM/project f8e228d — llvm/include/llvm/IR RuntimeLibcalls.td

Address review comments
DeltaFile
+5-8llvm/include/llvm/IR/RuntimeLibcalls.td
+5-81 files

LLVM/project 133a7e9 — llvm/include/llvm/IR RuntimeLibcallsImpl.td RuntimeLibcalls.td

RuntimeLibcalls: Organize functions into libraries

Associate runtime functions with the library which provides them. Add
shared LibcallLibrary defs, like compiler-rt, libm and libc, along with
OS and target specific variants, and replace each target's hand-listed
SystemRuntimeLibrary body with references to them. The resulting libcall
sets are unchanged.

Targets which differ from the shared libraries opt out of individual
functions, e.g. AVR has no sin, cos or sincos, x86 has no fp128 sincosl,
and PPC replaces some f128 compiler-rt helpers. Libraries which should
not merge with the generic variants are Isolated, like arm64ec's
compiler-rt and SPIRV's libc.

Co-authored-by: Claude Opus <noreply at anthropic.com>
DeltaFile
+478-304llvm/include/llvm/IR/RuntimeLibcalls.td
+0-1llvm/include/llvm/IR/RuntimeLibcallsImpl.td
+478-3052 files