LLVM/project ae6c969 — llvm/test/CodeGen/X86 vector-interleaved-load-i32-stride-8.ll vector-interleaved-load-i16-stride-7.ll

[X86] Enable SlotIndexes compaction by default

Compacting SlotIndexes before greedy allocation drops the entries of
erased instructions, so live range sizes and instruction distances
reflect the code being allocated rather than how much was erased
before it. AMDGPU has done this since #235806; do the same for X86.

Codegen changes only through allocation: no new crashes, verifier
errors or allocation failures in the lit suites, including
EXPENSIVE_CHECKS, and a stage-2 build of LLVM, clang and lld with
-verify-machineinstrs passes its own tests. On llvm-test-suite at -O3,
spills drop 0.3% and .text 0.06%, with compile time unchanged.

Most test updates are regenerated checks. misched-matmul now inserts
20 spills instead of 24. live-debug-vars-stale-slotindexes.mir gets
one more use of %27 so that accumulate_fit still reaches the stale
index path it was written for.
DeltaFile
+15,403-15,465llvm/test/CodeGen/X86/vector-interleaved-load-i64-stride-7.ll
+13,329-13,243llvm/test/CodeGen/X86/vector-interleaved-store-i64-stride-7.ll
+13,199-13,231llvm/test/CodeGen/X86/vector-interleaved-store-i64-stride-8.ll
+12,788-12,826llvm/test/CodeGen/X86/vector-interleaved-load-i64-stride-8.ll
+11,796-11,778llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-7.ll
+11,057-11,064llvm/test/CodeGen/X86/vector-interleaved-load-i32-stride-8.ll
+77,572-77,607446 files not shown
+344,037-345,683452 files

LLVM/project 9c1973b — clang/lib/CIR/CodeGen TargetInfo.cpp

[CIR] Remove `noexcept` from ABIInfo destructor (NFC) (#235779)

This NFC removes `noexcept` from the `ABIInfo` destructor in order to
suppress this compilation warning:

```sh
[1/10] Building CXX object tools/clang/lib/CIR/CodeGen/CMakeFiles/obj.clangCIR.dir/TargetInfo.cpp.o
/Users/federicobruzzone/dev/llvm-project/clang/lib/CIR/CodeGen/TargetInfo.cpp:177:10: warning: function previously declared with an implicit exception specification redeclared with an explicit exception specification [-Wimplicit-exception-spec-mismatch]
  177 | ABIInfo::~ABIInfo() noexcept = default;
      |          ^
/Users/federicobruzzone/dev/llvm-project/clang/lib/CIR/CodeGen/ABIInfo.h:25:11: note: previous declaration is here
   25 |   virtual ~ABIInfo();
      |           ^
1 warning generated.
```

Signed-off-by: Federico Bruzzone <federico.bruzzone.i at gmail.com>
DeltaFile
+1-1clang/lib/CIR/CodeGen/TargetInfo.cpp
+1-11 files

LLVM/project d7faee5 — llvm/test/CodeGen/AMDGPU memintrinsic-unroll.ll amdgcn.bitcast.832bit.ll

Rebase, address comments

Created using spr 1.3.7
DeltaFile
+88,705-91,244llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+25,383-26,405llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+9,311-9,381llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+8,998-9,209llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+8,016-8,194llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.832bit.ll
+7,335-7,432llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+147,748-151,8654,452 files not shown
+403,892-339,6254,458 files

LLVM/project 33e1c2c — llvm/test/Transforms/SLPVectorizer/X86 extracted-subfields-bswap.ll

[SLP][NFC]Add an extra test for extracted bswap vectorization, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/237554
DeltaFile
+35-0llvm/test/Transforms/SLPVectorizer/X86/extracted-subfields-bswap.ll
+35-01 files

LLVM/project 58d26f4 — llvm/test/CodeGen/AMDGPU token-factor-inline-limit-test.ll

[AMDGPU] token-factor-inline-limit-test.ll - regenerate test checks (#237551)

Prep work for topological sorting
DeltaFile
+154-42llvm/test/CodeGen/AMDGPU/token-factor-inline-limit-test.ll
+154-421 files

LLVM/project 832a087 — clang/test/CodeGenCXX new-init-stmt-expr.cpp, llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp

Merge branch 'users/void/asm-rm-4-regallocfast-fold' into users/void/asm-rm-5-prefer-reg
DeltaFile
+495-5llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+309-59llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+129-122offload/plugins-nextgen/common/src/PluginInterface.cpp
+236-0llvm/test/Instrumentation/MemorySanitizer/vector-extract-last-active.ll
+234-0llvm/test/ThinLTO/X86/memprof-report-hinted-sizes-detail.ll
+216-0clang/test/CodeGenCXX/new-init-stmt-expr.cpp
+1,619-186214 files not shown
+6,887-1,471220 files

LLVM/project f84fc62 — clang/test/CodeGenCXX new-init-stmt-expr.cpp, llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp

Merge branch 'users/void/asm-rm-3-direct-mem-output-error' into users/void/asm-rm-4-regallocfast-fold
DeltaFile
+495-5llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+309-59llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+129-122offload/plugins-nextgen/common/src/PluginInterface.cpp
+236-0llvm/test/Instrumentation/MemorySanitizer/vector-extract-last-active.ll
+234-0llvm/test/ThinLTO/X86/memprof-report-hinted-sizes-detail.ll
+216-0clang/test/CodeGenCXX/new-init-stmt-expr.cpp
+1,619-186214 files not shown
+6,887-1,471220 files

LLVM/project ad97904 — clang/test/CodeGenCXX new-init-stmt-expr.cpp, llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp

Merge branch 'users/void/asm-rm-2f-peephole-asm-load-fold' into users/void/asm-rm-3-direct-mem-output-error
DeltaFile
+495-5llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+309-59llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+129-122offload/plugins-nextgen/common/src/PluginInterface.cpp
+236-0llvm/test/Instrumentation/MemorySanitizer/vector-extract-last-active.ll
+234-0llvm/test/ThinLTO/X86/memprof-report-hinted-sizes-detail.ll
+216-0clang/test/CodeGenCXX/new-init-stmt-expr.cpp
+1,619-186214 files not shown
+6,887-1,471220 files

LLVM/project cb3aa8a — clang/test/CodeGenCXX new-init-stmt-expr.cpp, llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp

Merge branch 'users/void/asm-rm-2e-fold-asm-memoperands' into users/void/asm-rm-2f-peephole-asm-load-fold
DeltaFile
+495-5llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+309-59llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+129-122offload/plugins-nextgen/common/src/PluginInterface.cpp
+236-0llvm/test/Instrumentation/MemorySanitizer/vector-extract-last-active.ll
+234-0llvm/test/ThinLTO/X86/memprof-report-hinted-sizes-detail.ll
+216-0clang/test/CodeGenCXX/new-init-stmt-expr.cpp
+1,619-186214 files not shown
+6,887-1,471220 files

LLVM/project 56e0379 — clang/test/CodeGenCXX new-init-stmt-expr.cpp, llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp

Merge branch 'users/void/asm-rm-2d-prefer-spilling-foldable' into users/void/asm-rm-2e-fold-asm-memoperands
DeltaFile
+495-5llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+309-59llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+129-122offload/plugins-nextgen/common/src/PluginInterface.cpp
+236-0llvm/test/Instrumentation/MemorySanitizer/vector-extract-last-active.ll
+234-0llvm/test/ThinLTO/X86/memprof-report-hinted-sizes-detail.ll
+216-0clang/test/CodeGenCXX/new-init-stmt-expr.cpp
+1,619-186214 files not shown
+6,887-1,471220 files

LLVM/project 1d5aa61 — clang/test/CodeGenCXX new-init-stmt-expr.cpp, llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp

Merge branch 'users/void/asm-rm-2c-fold-subreg-offset' into users/void/asm-rm-2d-prefer-spilling-foldable
DeltaFile
+495-5llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+309-59llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+129-122offload/plugins-nextgen/common/src/PluginInterface.cpp
+236-0llvm/test/Instrumentation/MemorySanitizer/vector-extract-last-active.ll
+234-0llvm/test/ThinLTO/X86/memprof-report-hinted-sizes-detail.ll
+216-0clang/test/CodeGenCXX/new-init-stmt-expr.cpp
+1,619-186214 files not shown
+6,887-1,471220 files

LLVM/project c19d699 — clang/test/CodeGenCXX new-init-stmt-expr.cpp, llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp

Merge branch 'users/void/asm-rm-2b-fold-all-reg-operands' into users/void/asm-rm-2c-fold-subreg-offset
DeltaFile
+495-5llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+309-59llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+129-122offload/plugins-nextgen/common/src/PluginInterface.cpp
+236-0llvm/test/Instrumentation/MemorySanitizer/vector-extract-last-active.ll
+234-0llvm/test/ThinLTO/X86/memprof-report-hinted-sizes-detail.ll
+216-0clang/test/CodeGenCXX/new-init-stmt-expr.cpp
+1,619-186214 files not shown
+6,887-1,471220 files

LLVM/project ae15a48 — clang/test/CodeGenCXX new-init-stmt-expr.cpp, llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp

Merge branch 'users/void/asm-rm-2-fold-tied-operands' into users/void/asm-rm-2b-fold-all-reg-operands
DeltaFile
+495-5llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+309-59llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+129-122offload/plugins-nextgen/common/src/PluginInterface.cpp
+236-0llvm/test/Instrumentation/MemorySanitizer/vector-extract-last-active.ll
+234-0llvm/test/ThinLTO/X86/memprof-report-hinted-sizes-detail.ll
+216-0clang/test/CodeGenCXX/new-init-stmt-expr.cpp
+1,619-186214 files not shown
+6,887-1,471220 files

LLVM/project 7dfeb7f — clang/test/CodeGenCXX new-init-stmt-expr.cpp, llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp

Merge branch 'users/void/mir-inline-asm-func-kind' into users/void/asm-rm-2-fold-tied-operands
DeltaFile
+495-5llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+309-59llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+129-122offload/plugins-nextgen/common/src/PluginInterface.cpp
+236-0llvm/test/Instrumentation/MemorySanitizer/vector-extract-last-active.ll
+234-0llvm/test/ThinLTO/X86/memprof-report-hinted-sizes-detail.ll
+216-0clang/test/CodeGenCXX/new-init-stmt-expr.cpp
+1,619-186214 files not shown
+6,887-1,471220 files

LLVM/project c85e31f — clang/test/CodeGenCXX new-init-stmt-expr.cpp, llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp

Merge branch 'users/void/mir-inline-asm-operand-count' into users/void/mir-inline-asm-func-kind
DeltaFile
+495-5llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+309-59llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+129-122offload/plugins-nextgen/common/src/PluginInterface.cpp
+236-0llvm/test/Instrumentation/MemorySanitizer/vector-extract-last-active.ll
+234-0llvm/test/ThinLTO/X86/memprof-report-hinted-sizes-detail.ll
+216-0clang/test/CodeGenCXX/new-init-stmt-expr.cpp
+1,619-186214 files not shown
+6,887-1,471220 files

LLVM/project f080b89 — clang/test/CodeGenCXX new-init-stmt-expr.cpp, llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp

Merge branch 'main' into users/void/mir-inline-asm-operand-count
DeltaFile
+495-5llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+309-59llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+129-122offload/plugins-nextgen/common/src/PluginInterface.cpp
+236-0llvm/test/Instrumentation/MemorySanitizer/vector-extract-last-active.ll
+234-0llvm/test/ThinLTO/X86/memprof-report-hinted-sizes-detail.ll
+216-0clang/test/CodeGenCXX/new-init-stmt-expr.cpp
+1,619-186214 files not shown
+6,887-1,471220 files

LLVM/project 7a59bfc — llvm/lib/Target/AArch64/GISel AArch64InstructionSelector.cpp, llvm/lib/Target/X86/GISel X86InstructionSelector.cpp

[GlobalISel] Don't constrain register classes of debug operands (#228078)

D129037 made the AArch64 and X86 selectors constrain every vreg operand
of a debug instruction to the smallest register class for its bank. The
case it targeted was a `DBG_VALUE` left referring to an erased def: the
vreg had no class after selection, and a later `getRegClass` call
crashed.

The constraint also applies to vregs with real defs and uses. A debug
instruction is selected before the def of its operand, so the operand
already has the smallest class when its def is selected, even if the def
would give it a wider class without debug info. In #227628, a `COPY`
destination gets `gpr64` instead of `gpr64all`, so the `COPY` is no
longer removed as redundant and the `-O0` code changes.

#231716 fixed the erased-def case at its source: `salvageDebugInfo` now
sets unsalvageable debug uses to `$noreg`.

This PR removes `selectDebugInstr` from both selectors. Vregs with

    [7 lines not shown]
DeltaFile
+0-36llvm/lib/Target/X86/GISel/X86InstructionSelector.cpp
+0-35llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
+23-0llvm/test/CodeGen/AArch64/GlobalISel/select-dbg-value.mir
+2-3llvm/test/DebugInfo/X86/debug-reg-bank.mir
+2-3llvm/test/DebugInfo/AArch64/debug-reg-bank.mir
+2-2llvm/test/CodeGen/AArch64/GlobalISel/select-hint.mir
+29-796 files

LLVM/project 93d4bb3 — lldb/source/Plugins/Process/Utility NativeRegisterContextDBReg.cpp, lldb/source/Plugins/Register/Native NativeRegisterContextDBReg.cpp

Merge remote-tracking branch 'origin/main' into users/mrsidims/fix-slp-cast-ir-flags
DeltaFile
+495-5llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+0-411lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg.cpp
+410-0lldb/source/Plugins/Register/Native/NativeRegisterContextDBReg.cpp
+0-408llvm/lib/CodeGen/LiveVariables.cpp
+309-59llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+0-347llvm/lib/Transforms/IPO/GlobalOpt.cpp
+1,214-1,230329 files not shown
+9,246-4,863335 files

LLVM/project 4b6842b — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp

apply comment
DeltaFile
+2-3llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+2-31 files

LLVM/project 8c7a948 — llvm/lib/Target/ARM ARMISelLowering.cpp, llvm/test/CodeGen/Thumb2 mve-vector-deinterleave-load.ll

[ARM] Fold away buildvector(buildvector) (#235524)

This folds away ARMISD::BUILD_VECTOR of another BUILD_VECTOR, generating
a new operation with the operand values directly.

This fixes #234135 from seeing verifier errors by avoiding the undef
lanes.
DeltaFile
+31-2llvm/lib/Target/ARM/ARMISelLowering.cpp
+18-0llvm/test/CodeGen/Thumb2/mve-vector-deinterleave-load.ll
+49-22 files

LLVM/project 6c68e76 — clang/include/clang/Analysis/Analyses/LifetimeSafety LifetimeSafety.h, clang/lib/Analysis/LifetimeSafety Checker.cpp

[LifetimeSafety] Use buildOriginFlowChain for remaining diagnostics in issuePendingWarnings (#212083)
DeltaFile
+25-24clang/test/Sema/LifetimeSafety/safety.cpp
+32-16clang/test/Sema/LifetimeSafety/dangling-field.cpp
+18-17clang/lib/Analysis/LifetimeSafety/Checker.cpp
+21-13clang/lib/Sema/SemaLifetimeSafety.h
+15-9clang/test/Sema/LifetimeSafety/invalidations.cpp
+13-5clang/include/clang/Analysis/Analyses/LifetimeSafety/LifetimeSafety.h
+124-846 files not shown
+148-11212 files

LLVM/project 1f6427d — llvm/lib/Transforms/Scalar LoopStrengthReduce.cpp, llvm/test/Transforms/LoopStrengthReduce/X86 lcssa-preservation-regression.ll duplicate-phi-nodes.ll

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+55-0llvm/test/Transforms/LoopStrengthReduce/X86/incoming-dead-insts.ll
+51-0llvm/test/Transforms/LoopStrengthReduce/X86/duplicate-phi-nodes.ll
+9-0llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+0-2llvm/test/Transforms/LoopStrengthReduce/X86/lcssa-preservation-regression.ll
+115-24 files

LLVM/project 21b56c5 — llvm/lib/Transforms/Scalar LoopStrengthReduce.cpp, llvm/test/Transforms/LoopStrengthReduce preserve-lcssa.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+52-0llvm/test/Transforms/LoopStrengthReduce/X86/incoming-dead-insts.ll
+51-0llvm/test/Transforms/LoopStrengthReduce/X86/duplicate-phi-nodes.ll
+13-0llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+0-3llvm/test/Transforms/LoopStrengthReduce/X86/lcssa-preservation-regression.ll
+0-1llvm/test/Transforms/LoopStrengthReduce/preserve-lcssa.ll
+116-45 files

LLVM/project 632eba8 — llvm/lib/Transforms/Scalar LoopStrengthReduce.cpp, llvm/test/Transforms/LoopStrengthReduce/X86 lcssa-preservation-regression.ll duplicate-phi-nodes.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+55-0llvm/test/Transforms/LoopStrengthReduce/X86/incoming-dead-insts.ll
+51-0llvm/test/Transforms/LoopStrengthReduce/X86/duplicate-phi-nodes.ll
+9-0llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+0-2llvm/test/Transforms/LoopStrengthReduce/X86/lcssa-preservation-regression.ll
+115-24 files

LLVM/project 7edae3f — llvm/lib/Transforms/Scalar LoopStrengthReduce.cpp, llvm/test/Transforms/LoopStrengthReduce/X86 lcssa-preservation-regression.ll duplicate-phi-nodes.ll

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+51-0llvm/test/Transforms/LoopStrengthReduce/X86/duplicate-phi-nodes.ll
+9-0llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+0-2llvm/test/Transforms/LoopStrengthReduce/X86/lcssa-preservation-regression.ll
+60-23 files

LLVM/project ac9879e — clang/docs ReleaseNotes.md, clang/lib/CodeGen CGCXX.cpp

[clang][CodeGen] Fix a crash caused by inconsistent addrspace (#236752)

fixes https://github.com/llvm/llvm-project/issues/236285
DeltaFile
+20-0clang/test/CodeGen/avr/issue-236285.cpp
+5-3clang/lib/CodeGen/CGCXX.cpp
+2-0clang/docs/ReleaseNotes.md
+27-33 files

LLVM/project e98b16a — llvm/include/llvm/ADT AddressRanges.h

[ADT] Qualify AddressRange in AddressRangesBase::find. NFC (#237144)

With `-fdelayed-template-parsing` (the default for clang targeting the
MSVC ABI), `find` is parsed at the end of the TU, where `llvm-profgen`
makes `llvm::sampleprof::AddressRange` visible in `namespace llvm`.
Qualify with `llvm::` to avoid the ambiguity.

```
AddressRanges.h:101:42: error: reference to 'AddressRange' is ambiguous
note: candidate found by name lookup is 'llvm::AddressRange'
note: candidate found by name lookup is 'llvm::sampleprof::AddressRange'
```
DeltaFile
+4-3llvm/include/llvm/ADT/AddressRanges.h
+4-31 files

LLVM/project e47d33d — llvm/lib/Target/Sparc SparcInstrInfo.td SparcISelLowering.cpp, llvm/test/CodeGen/SPARC tls-ie-licm.ll

[SPARC] Keep the GOT memory operand on TLS initial-exec loads (#237512)

The initial-exec TP offset load (SPISD::TLS_LD) was a plain node, so
TLS_LD[X]rr had no memory operand and was not known to be an invariant
load. MachineLICM, MachineCSE and rematerialization then left one GOT
load per use, including inside loops.

Build it as a memory node with a GOT MachinePointerInfo, as was done for
the GOTDATA_OP load in 5cf27304eccf.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+49-0llvm/test/CodeGen/SPARC/tls-ie-licm.ll
+5-3llvm/lib/Target/Sparc/SparcISelLowering.cpp
+2-1llvm/lib/Target/Sparc/SparcInstrInfo.td
+56-43 files

LLVM/project cf44dd9 — llvm/lib/Target/DirectX DXILIntrinsicExpansion.cpp

[DirectX] expandIsFPClass - silence MSVC promoted shift warning (#237237)

Use APInt::getSignMask to create -0.0 bitmask instead of raw uint32_t
shift that is then implicitly promoted to uint64_t in the
ConstantInt::get call.

Silences MSVC "result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)" warning.
DeltaFile
+2-3llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp
+2-31 files

LLVM/project 00cbe82 — libc/src/stdlib CMakeLists.txt environ_internal.cpp, libc/test/integration/src/stdlib CMakeLists.txt getenv_test.cpp

[libc][stdlib] Avoid scanning values during environment lookup (#228633)

Constructing a string_view for each environment entry scans the entire
value to determine its length, even when the name does not match. This
makes lookups unnecessarily expensive for long values such as PATH.

Filter entries by their first character, then compare the remaining name
up to a mismatch or null terminator. Require a following '=' to match
the complete key, preserving support for empty names in putenv.

Closes #196016
DeltaFile
+32-0libc/test/integration/src/stdlib/getenv_test.cpp
+19-4libc/src/stdlib/environ_internal.cpp
+1-0libc/test/integration/src/stdlib/CMakeLists.txt
+1-0libc/src/stdlib/CMakeLists.txt
+53-44 files