LLVM/project 4ee94b0llvm/lib/Target/AArch64 SMEPeepholeOpt.cpp, llvm/test/CodeGen/AArch64 sme-peephole-opt-sm-compat.ll stack-hazard.ll

 [AArch64] Allow SME peephole opts without +sme in streaming compat functions (#222728)
DeltaFile
+7-31llvm/test/CodeGen/AArch64/stack-hazard.ll
+36-0llvm/test/CodeGen/AArch64/sme-peephole-opt-sm-compat.ll
+5-2llvm/lib/Target/AArch64/SMEPeepholeOpt.cpp
+48-333 files

LLVM/project 28f36e6clang/lib/Driver/ToolChains WebAssembly.cpp, clang/test/Driver wasm-toolchain.c

WebAssembly: Drive Emscripten EH from the exception model, drop the cl::opt (#223972)

Remove the deprecated -enable-emscripten-cxx-exceptions flag. This
should now be driven by the generic exception-model mechanisms. There 
was also some special case handling of the -mllvm flag in the clang driver 
which also needed removal.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+1-25clang/test/Driver/wasm-toolchain.c
+2-14llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+3-13clang/lib/Driver/ToolChains/WebAssembly.cpp
+5-2llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
+1-5llvm/lib/Target/WebAssembly/WebAssemblyCodeGenPassBuilder.cpp
+1-2llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+13-611 files not shown
+13-627 files

LLVM/project de199ddclang/lib/StaticAnalyzer/Checkers/WebKit PtrTypesSemantics.cpp, clang/test/Analysis/Checkers/WebKit uncounted-local-vars.cpp

[WebKit Checkers] Honor using declarations when looking up protocol conformance (#223902)
DeltaFile
+40-0clang/test/Analysis/Checkers/WebKit/uncounted-local-vars.cpp
+9-0clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
+49-02 files

LLVM/project 15cff90libc/src/__support/threads/linux thread.cpp, libc/startup/linux CMakeLists.txt do_start.cpp

[libc] Make it possible to join the main thread (#221177)

Joining the main thread currently crashes because its ThreadAttributes
has a null platform_data pointer, causing Thread::wait() to dereference
a null futex.

While this is not a frequently used feature, it is supported by other
implementations, and I believe it is required by POSIX (the exec page
says that the main thread is created in a joinable state, and neither
pthread_join nor pthread_exit mention them not working on the main
thread).

This patch sets up the main thread attributes during startup:
- allocate a static futex for the main thread's clear_tid and point
platform_data to it
- invoke set_tid_address to have the kernel clear the futex and wake
waiters on thread termination
- mark the main thread as joinable (it was previously defaulting to
detached)

    [10 lines not shown]
DeltaFile
+45-0libc/test/integration/src/pthread/pthread_join_main_test.cpp
+10-12libc/src/__support/threads/linux/thread.cpp
+15-0libc/test/integration/src/pthread/CMakeLists.txt
+6-0libc/startup/linux/do_start.cpp
+1-1libc/test/integration/src/pthread/pthread_getattr_np_test.cpp
+1-0libc/startup/linux/CMakeLists.txt
+78-136 files

LLVM/project ee0f498llvm/lib/Transforms/Scalar SROA.cpp, llvm/test/Transforms/SROA struct-to-vector-stack-alignment.ll

[SROA] Avoid unnecessary stack realignment when rewriting allocas (#222967)

SROA can introduce dynamic stack realignment when rewriting an aggregate
alloca as a vector. On SystemZ (`S64`), a five-pointer structure with
alignment 8 becomes `<5 x ptr>` with alignment 64, adding an alignment
mask and extra stack-frame setup instructions.

Create replacement allocas with the alignment inherited from the
original alloca and partition offset, then use `tryEnforceAlignment` to
request the preferred type alignment. This reuses the existing
stack-alignment check: when a natural stack alignment is specified,
promotions beyond it are rejected. Stronger inherited alignments are
preserved.

Add SROA-only regression coverage for `S64`, `S128`, unspecified natural
stack alignment, and explicit stronger alignments. Existing SROA,
debug-info, and NVPTX tests retain their original RUN lines and checks,
including the NVPTX vector stores.


    [2 lines not shown]
DeltaFile
+140-0llvm/test/Transforms/SROA/struct-to-vector-stack-alignment.ll
+5-8llvm/lib/Transforms/Scalar/SROA.cpp
+145-82 files

LLVM/project e470d98clang/www cxx_status.html

[clang][www] Fix a typo in cxx_status page (#224206)

the "Clang 24" shows up left-aligned right now.
DeltaFile
+1-1clang/www/cxx_status.html
+1-11 files

LLVM/project 53a00b2llvm/include/llvm/ADT DenseMap.h, llvm/unittests/ADT DenseMapTest.cpp

[DenseMap] memcpy buckets with trivial copy constructor and destructor. NFC (#224193)

std::pair has a user-provided copy assignment operator, so
std::is_trivially_copyable is false. Define is weaker
isRelocatableBucket instead.

This optimizes some DenseMap instantiations within lld (e.g.
lld/ELF/SyntheticSections.cpp)
DeltaFile
+8-1llvm/include/llvm/ADT/DenseMap.h
+8-0llvm/unittests/ADT/DenseMapTest.cpp
+16-12 files

LLVM/project 39ee115compiler-rt/lib/builtins assembly.h, compiler-rt/lib/builtins/arm aeabi_cfcmp.S

[compiler-rt][ARM] Make ARMv4T assembly builtins interwork (#221725)

ARMv4T can't switch instruction state when a saved return address is
loaded directly into the pc. Several builtins did exactly that, so a
call from Thumb could call into Arm state and return without switching.

To mitigate that, this patch amends POP_PC and adds
POP_PC_WITH_REGS, which expand to sensible code depending on
what arch they are compiled for. ARMv5 and later keep direct pop-to-pc
forms. v4T returns through ip and bx.
DeltaFile
+102-0compiler-rt/test/builtins/Unit/arm/aeabi_mem_test.c
+71-0compiler-rt/test/builtins/Unit/arm/aeabi_cmpflags_interwork_test.c
+56-0compiler-rt/test/builtins/Unit/arm/aeabi_ldivmod_test.c
+40-0compiler-rt/test/builtins/Unit/arm/aeabi_fcmp_test.c
+20-4compiler-rt/lib/builtins/assembly.h
+7-7compiler-rt/lib/builtins/arm/aeabi_cfcmp.S
+296-1123 files not shown
+345-3929 files

LLVM/project 7db98d6mlir/lib/Dialect/Affine/IR AffineOps.cpp, mlir/test/Dialect/Affine constant-fold.mlir

[mlir][affine] Avoid folding out-of-bounds constant loads (#224076)

`AffineLoadOp::fold` could crash when folding a constant load with
out-of-bounds indices, including loads from zero-sized constant memrefs.

Check `ElementsAttr::isValidIndex` before indexing the constant
attribute and skip folding when the access is invalid.

Adds a regression test for `memref<0xi8>`.

Fixes #223949

Co-authored-by: Purnima Shrivastava <purnimashrivastava05@.com>
DeltaFile
+12-0mlir/test/Dialect/Affine/constant-fold.mlir
+4-1mlir/lib/Dialect/Affine/IR/AffineOps.cpp
+16-12 files

LLVM/project 9310ac7clang/lib/CIR/CodeGen CIRGenRecordLayoutBuilder.cpp, clang/test/CIR/CodeGen bitfield-unaligned-expensive-access.c

[CIR] Support bitfields when unaligned access is expensive (#223748)

This basically ports OGCG codepath to enable bitfields on AMDGPU.

Assisted by claude in test checks generation.
DeltaFile
+260-0clang/test/CIR/CodeGen/bitfield-unaligned-expensive-access.c
+24-3clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
+284-32 files

LLVM/project efb4638libc/src/stdlib CMakeLists.txt mkostemp.h, libc/src/stdlib/linux CMakeLists.txt mkostemp.cpp

[libc] Implement mkostemp (#224112)

Added the POSIX mkostemp entrypoint for Linux targets (aarch64, riscv,
x86_64) following the shared mktemp_core helper pattern from commit
1b48a14a3608.

Validated open flags against the supported POSIX Issue 8 set (O_APPEND,
O_CLOEXEC, O_DSYNC, O_SYNC) before invoking internal::mktemp_core.

Added unit tests in mkostemp_test.cpp covering flag combinations, append
semantics, template modification, and error conditions.

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+337-0libc/test/src/stdlib/mkostemp_test.cpp
+48-0libc/src/stdlib/linux/mkostemp.cpp
+33-0libc/test/src/stdlib/CMakeLists.txt
+25-0libc/src/stdlib/mkostemp.h
+18-0libc/src/stdlib/linux/CMakeLists.txt
+7-0libc/src/stdlib/CMakeLists.txt
+468-04 files not shown
+478-010 files

LLVM/project bdb0f57llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/test/CodeGen/AArch64 lowmaskedlanes.ll

[DAG] Optimize masked store of constant lane mask to standard store (#223665)

A masked store with a constant mask enabling the first n lanes can be
lowered to a standard store of size n.

For example a masked store with masks `<1, 1, 0, 0>` or a scalable store
with mask `llvm.get.active.lane.mask.v4i1.i32(i32 0, i32 2)`
DeltaFile
+68-9llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+11-36llvm/test/CodeGen/AArch64/lowmaskedlanes.ll
+15-12llvm/test/CodeGen/Hexagon/autohvx/vector-align-basic.ll
+2-10llvm/test/CodeGen/X86/apx/kmov-postrapseudos.ll
+2-4llvm/test/CodeGen/X86/pr179489.ll
+0-2llvm/test/CodeGen/X86/pr46532.ll
+98-736 files

LLVM/project f557f80clang/lib/CIR/CodeGen CIRGenAtomic.cpp, clang/test/CIR/CodeGenHIP atomic-classify.hip

[CIR][AMDGPU][OpenCL] Classify __hip_atomic_*/__opencl_atomic_* operations (#220856)

load, store, exchange, compare_exchange_strong/weak, and every fetch op
were missing from the operand-classification switches, so they fell to
the default and reported an unimplemented atomic. They take the same
operands as their __c11_atomic_*/__atomic_* counterparts, so they belong
with them.

This is the ground work for implementing more AMDGPU atomics.

---------

Signed-off-by: Steffen Holst Larsen <sholstla at amd.com>
DeltaFile
+207-0clang/test/CIR/CodeGenHIP/atomic-classify.hip
+50-39clang/lib/CIR/CodeGen/CIRGenAtomic.cpp
+257-392 files

LLVM/project 511e3cbclang-tools-extra/clangd Hover.cpp, clang-tools-extra/clangd/unittests HoverTests.cpp

[clang][clangd] Resolve decltype when printing types for display (#223950)

`decltype(x)` is rarely what a reader wants to see in a display context:
a code completion offering `set_x(decltype(x) val)` conveys much less
than `set_x(int val)`.

clangd already worked around this for hover, by stripping decltypes off
the type before printing it, with a FIXME noting that this belongs in a
printing policy and that it does not handle composite types.
`HoverTests.cpp` carries a matching FIXME on one of the cases it misses.
Add such a policy flag, honour it in `TypePrinter`, and set it both for
code completion and for the types clangd displays on hover.

Applying it in the printer rather than at the call site also covers the
cases the workaround could not reach:

```c++
const decltype(a) b;                 // was `int`, now `const int`
void f(decltype(lamb) &bar);         // was `decltype(lamb) &`, now `(lambda) &`

    [16 lines not shown]
DeltaFile
+11-6clang-tools-extra/clangd/Hover.cpp
+10-2clang/include/clang/AST/PrettyPrinter.h
+12-0clang-tools-extra/docs/ReleaseNotes.md
+3-6clang-tools-extra/clangd/unittests/HoverTests.cpp
+8-1clang/lib/AST/TypePrinter.cpp
+5-0clang/docs/ReleaseNotes.md
+49-151 files not shown
+50-157 files

LLVM/project 33c1570llvm/include/llvm/IR Instruction.h, llvm/lib/IR Verifier.cpp Core.cpp

[IR] Make Instruction::DebugMarker private behind getDbgMarker(). NFC (#224190)

Make it private and add getDbgMarker(); only BasicBlock and DbgMarker,
which maintain the marker links, write it. This enables experiments to
change the data representation.

Aided by Opus 5
DeltaFile
+38-37llvm/unittests/IR/DebugInfoTest.cpp
+37-37llvm/unittests/IR/BasicBlockDbgInfoTest.cpp
+17-18llvm/lib/IR/BasicBlock.cpp
+8-8llvm/lib/IR/Core.cpp
+5-3llvm/include/llvm/IR/Instruction.h
+3-3llvm/lib/IR/Verifier.cpp
+108-1063 files not shown
+113-1109 files

LLVM/project c8e8ad2llvm/lib/Transforms/InstCombine InstCombineMulDivRem.cpp, llvm/test/Transforms/InstCombine div.ll

Update for comments
DeltaFile
+11-7llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
+4-4llvm/test/Transforms/InstCombine/div.ll
+15-112 files

LLVM/project 104cbaflld/test/ELF/linkerscript nobits-offset.s

[ELF,test] Extend nobits-offset.s to cover sections following .bss (#224201)
DeltaFile
+54-7lld/test/ELF/linkerscript/nobits-offset.s
+54-71 files

LLVM/project 1ea7ebbllvm/lib/Target/X86 X86InstrOperands.td X86InstrSSE.td, llvm/test/MC/X86/apx no-rex2-reject.s

X86: Stop overriding getRegClass

Making TargetInstrInfo::getRegClass virtual was an AMDGPU hack that should not
spread to other backends (X86 overrode it in #70958). The override kept GPR
operands out of the *_NOREX2 subclasses for instructions that cannot encode
r16-r31 with EGPR. Express this constraint with RegClassByHwMode instead, which
allows dropping the virtual.

This also enables the machine verifier to enforce the constraint, which was
previously ignored. Also fixes missing assembler tests enforcing the constraint.
There is custom assembler code for this case which may be deletable after this.

I don't really know about all the X86isms here, AI did most of that.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+65-65llvm/lib/Target/X86/X86InstrFPStack.td
+40-40llvm/lib/Target/X86/X86InstrSSE.td
+45-29llvm/utils/TableGen/X86RecognizableInstr.cpp
+63-10llvm/lib/Target/X86/X86InstrOperands.td
+62-0llvm/test/MachineVerifier/X86/apx-norex2-regclass.mir
+33-0llvm/test/MC/X86/apx/no-rex2-reject.s
+308-14410 files not shown
+380-20416 files

LLVM/project cd6dab0llvm/include/llvm/Target Target.td, llvm/lib/Target/PowerPC PPCRegisterInfo.cpp

CodeGen: Remove PointerLikeRegClass (#223965)

Remove PointerLikeRegClass and the related getPointerRegClass
TargetRegisterInfo hook. This is obsoleted by RegClassByHwMode.
Previously targets would have to map ptr_rc to an assumed pointer
register class by implementing this method, but this is now
auto-resolvable per instruction using RegClassByHwMode.

Depends #223930

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+9-19llvm/include/llvm/Target/Target.td
+14-8llvm/utils/TableGen/InstrInfoEmitter.cpp
+0-17llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
+13-0llvm/utils/TableGen/Common/CodeGenTarget.cpp
+0-12llvm/lib/Target/X86/X86RegisterInfo.cpp
+5-4llvm/utils/TableGen/Common/CodeGenTarget.h
+41-6031 files not shown
+46-19437 files

LLVM/project 92df387mlir/include/mlir/Dialect/LLVMIR LLVMOps.td, mlir/test/Target/LLVMIR attribute-dereferenceable.mlir

[mlir][LLVM] Fix crash when dereferenceable instruction is folded (#221682)

`inst` is null when the builder folds the cast of a constant. Fix
nullptr dereference by dropping the metadata.
DeltaFile
+9-0mlir/test/Target/LLVMIR/attribute-dereferenceable.mlir
+2-2mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+11-22 files

LLVM/project 2836b91llvm/include/llvm/CodeGen TargetInstrInfo.h, llvm/lib/Target/AArch64 AArch64ISelDAGToDAG.cpp

CodeGen: Add getInlineAsmMemoryOperandRegClass (#223959)

Replace the use of getPointerRegClass to determine the register
class from an asm memory constraint, working to delete it. When
there are multiple pointer types there can't be just a single
answer.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+11-0llvm/lib/Target/X86/X86InstrInfo.cpp
+8-0llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp
+4-3llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
+7-0llvm/lib/Target/AMDGPU/SIInstrInfo.h
+7-0llvm/include/llvm/CodeGen/TargetInstrInfo.h
+6-0llvm/lib/Target/AVR/AVRInstrInfo.h
+43-321 files not shown
+128-727 files

LLVM/project 8e82c9bclang/docs ReleaseNotes.md, clang/lib/Sema SemaChecking.cpp

[Clang][Sema] Improve shuffle vector size mismatch diagnostic (#223768)

Previously, Clang would error out that the arguments to the
shufflevector builtin in dynamic mode were not the same type, but they
don't need to be. What is required is to have the same number of
elements.

This PR updates the error message to report the actual reason behind the
error.

Issue #221791
DeltaFile
+7-0clang/test/SemaCXX/vector-shuffle.cpp
+2-3clang/lib/Sema/SemaChecking.cpp
+3-0clang/docs/ReleaseNotes.md
+12-33 files

LLVM/project bc93a52llvm/lib/Target/AMDGPU VOPCInstructions.td, llvm/test/CodeGen/AMDGPU coexec-sched-flavor-classification.mir

[AMDGPU] Make VOPC_Pseudo inherit from VOP_Pseudo

GFX1250 blocking-cycle modeling misses _e32 VOPC_Pseudo because the
searchable table filters on VOP_Pseudo. Shrink can emit that encoding
before co-exec, so F64/I64/class compares were treated as 1-cycle VALU.

Side effect of this change is that _e32 VOPC_Pseudo records are also
included in the True16 and DP-MACC tables.
DeltaFile
+46-0llvm/test/CodeGen/AMDGPU/coexec-sched-flavor-classification.mir
+2-14llvm/lib/Target/AMDGPU/VOPCInstructions.td
+48-142 files

LLVM/project c36cc15llvm/lib/Target/AMDGPU VOP3PInstructions.td VOPInstructions.td, llvm/test/CodeGen/AMDGPU coexec-sched-flavor-classification.mir

[AMDGPU] Cover missed gfx1250 VALU blocking-cycle opcodes

Annotate gfx12+ F64 add/mul and B64 shift pseudos, F64 class compares,
pseudo-scalar TRANS, integer dots, and DPP. Fix VOPC I64/U64 end-of-block
comments that said 32 instead of 2.
DeltaFile
+92-0llvm/test/CodeGen/AMDGPU/coexec-sched-flavor-classification.mir
+7-4llvm/lib/Target/AMDGPU/VOPCInstructions.td
+5-4llvm/lib/Target/AMDGPU/VOP2Instructions.td
+4-2llvm/lib/Target/AMDGPU/VOP3Instructions.td
+4-0llvm/lib/Target/AMDGPU/VOPInstructions.td
+1-1llvm/lib/Target/AMDGPU/VOP3PInstructions.td
+113-116 files

LLVM/project b487317llvm/lib/Target/AMDGPU SIInstrInfo.cpp GCNSubtarget.h

[AMDGPU] BlockingCycle feature gated with ST.hasGFX1250VALUBlockingCycles().
DeltaFile
+4-0llvm/lib/Target/AMDGPU/GCNSubtarget.h
+1-1llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+5-12 files

LLVM/project a8252f3llvm/lib/Target/AMDGPU VOPCInstructions.td VOPInstructions.td, llvm/test/CodeGen/AMDGPU coexec-sched-flavor-classification.mir

[AMDGPU] Model GFX1250 VALU blocking cycles

Some gfx1250 VALU instructions block the VALU pipe for N cycles, and
the CoExec scheduler must model that occupancy. The existing SchedModel
cannot represent this given current modelling constraints (see #202775).

Attach GFX1250BlockingCycles to the VOP instruction definitions and
emit a searchable table so SIInstrInfo::getBlockingCycles() can report
the occupancy. CoExec uses that to classify multi-cycle VALU and to
account for blocking when computing HWUI cycles.

Authored by Jeffrey Byrnes <jeffrey.byrnes at amd.com>

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+132-6llvm/test/CodeGen/AMDGPU/coexec-sched-flavor-classification.mir
+56-38llvm/lib/Target/AMDGPU/VOP3Instructions.td
+23-16llvm/lib/Target/AMDGPU/VOP1Instructions.td
+19-0llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+15-0llvm/lib/Target/AMDGPU/VOPInstructions.td
+9-2llvm/lib/Target/AMDGPU/VOPCInstructions.td
+254-623 files not shown
+269-679 files

LLVM/project 162929dclang/lib/Driver/ToolChains WebAssembly.cpp, clang/test/Driver wasm-toolchain.c

WebAssembly: Drive Emscripten EH from the exception model, drop the cl::opt

Remove the deprecated -enable-emscripten-cxx-exceptions flag. This should now
be driven by the generic exception-model mechanisms. There was also some special
case handling of the -mllvm flag in the clang driver which also needed removal.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+1-25clang/test/Driver/wasm-toolchain.c
+2-14llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+3-13clang/lib/Driver/ToolChains/WebAssembly.cpp
+5-2llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
+1-5llvm/lib/Target/WebAssembly/WebAssemblyCodeGenPassBuilder.cpp
+1-2llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+13-611 files not shown
+13-627 files

LLVM/project 73c8b54llvm/include/llvm/Analysis RuntimeLibcallInfo.h, llvm/include/llvm/IR RuntimeLibcalls.h

RuntimeLibcalls: Read exception model from the module flag (#223971)

Source the exception model in the RuntimeLibcallsInfo(Module)
constructor from the "exception-model" module flag via 
Module::getExceptionModel(), instead of forwarding it from TargetOptions. 
An absent flag resolves to Default and then to the triple default; an explicit "none" 
disables exceptions.

Since the model now comes from the module, drop the ExceptionModel that
RuntimeLibraryAnalysis carried and forwarded, and its argument at every
construction site.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+20-0llvm/lib/CodeGen/CommandFlags.cpp
+7-7llvm/include/llvm/IR/RuntimeLibcalls.h
+3-7llvm/include/llvm/Analysis/RuntimeLibcallInfo.h
+3-5llvm/lib/IR/RuntimeLibcalls.cpp
+4-4llvm/lib/Analysis/RuntimeLibcallInfo.cpp
+2-2llvm/tools/opt/optdriver.cpp
+39-257 files not shown
+47-3813 files

LLVM/project 410c7e4lld/test/ELF/lto riscv-target-abi.ll, llvm/lib/Target/RISCV RISCVAsmPrinter.cpp

[RISCV] Do not re-validate target ABI in AsmParser if already resolved by streamer (#223606)

Commit 105ff16f816f (https://github.com/llvm/llvm-project/pull/213410)
changed RISCVABI::computeTargetABI() to return Expected<ABI> and added
validation to RISCVAsmParser::onBeginOfFile() to report invalid
-target-abi flags with real source location in llvm-mc.

However, this broke LTO builds containing inline assembly (e.g. Android
riscv64 builds and downstream Rust in
https://github.com/rust-lang/rust/pull/162783). During LTO, LLD sets
TargetOptions.MCOptions.ABIName from the module's target-abi metadata
("lp64d"), while the linker's default TargetMachine subtarget lacks
"+d" (individual functions specify "+d" in target-features).
RISCVSubtarget handles this gracefully by emitting a diagnostic note
and falling back to lp64 for code generation. When inline assembly was
subsequently parsed, AsmPrinter::emitInlineAsm instantiated
RISCVAsmParser with a subtarget lacking "+d", causing onBeginOfFile() to
re-validate TargetOptions.ABIName and fail with a fatal error.


    [5 lines not shown]
DeltaFile
+13-3lld/test/ELF/lto/riscv-target-abi.ll
+12-1llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+3-5llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
+3-0llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+1-0llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h
+32-95 files

LLVM/project 45c1a19clang/lib/AST/ByteCode Pointer.h Interp.cpp, clang/test/CodeGen cfstring2.c

[clang][bytecode] Accept pointer casts of expr-based opaque pointers (#223982)

We create opaque pointers for a few types of "opaque" expressions, where
we need to just pass the pointer along to the end of the evaluation and
such pointer casts are fine on those.
DeltaFile
+2-2clang/lib/AST/ByteCode/Interp.cpp
+1-0clang/test/CodeGen/cfstring2.c
+1-0clang/lib/AST/ByteCode/Pointer.h
+4-23 files