[mlir][SPIR-V] Deserialize null array and struct constants (#231626)
Deserialize OpConstantNull for arrays and literal structs by recursively
building the ArrayAttr representation used by spirv.Constant. Preserve
rejection of unsupported constituent types and report the nested type
when a null value cannot be represented.
Allow OpConstantComposite with no constituents for empty structs so that
imported null empty structs can round-trip. Diagnose OpUndef
constituents explicitly instead of reporting them as missing normal
constants.
Document the supported representations and add binary deserialization,
round-trip, and negative tests for aggregate constants.
---------
Co-authored-by: Claude Fable 5.2 <noreply at anthropic.com>
AMDGPU: Fix double interval removal in SIOptimizeExecMaskingPreRA
An exec copy folded after its use was erased from an s_endpgm block
had its interval removed twice. Fixes an assert after 6a483810f0da.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[RISCV][P-ext] Use EVT in `combinePExtWidening*Acc` (#242687)
Fixes https://github.com/llvm/llvm-project/issues/242679.
The previous implementation assumes a simple value type, which is wrong
for weird-sized integers.
Assisted-by: Codex
graphics/qgis-ltr: Fix once more pkg-plist
During the correction process in the previous commit, the entry for
qgis_mapserv.fcgi was accidentally updated to newer versions of QGIS.
MFH: 2026Q4
(cherry picked from commit 16fb65e819caab5ca63e82029ac232c22e512f68)
DAG: Allow narrowing sint_to_fp source to the sext source type
Same as 241c94e3919e for uint_to_fp. The narrowing fold skipped
sint_to_fp (sext x) when the narrow type matched x, so sitofp (sext i32
to i64) was expanded as a 64-bit conversion on AMDGPU.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
AMDGPU: Add more sitofp of sext from i32 tests
These currently get the full i64 conversion expansion.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
CSKY: Use LastSubtargetCache in getSubtargetImpl
Migrate to the new common pattern for targets to cache the last
result.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
graphics/qgis-ltr: Fix once more pkg-plist
During the correction process in the previous commit, the entry for
qgis_mapserv.fcgi was accidentally updated to newer versions of QGIS.
MFH: 2026Q4
SystemZ: Use LastSubtargetCache in getSubtargetImpl
Migrate to the new common pattern and infrastructure.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
WebAssembly: Use LastSubtargetCache in getSubtargetImpl
Cache the last subtarget and use the new common pattern for targets.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Mips: Use LastSubtargetCache in getSubtargetImpl
Migrate to use the new common infrastructure and pattern which caches
based on the last used subtarget.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Bitstream: Move the slow path of Read out of line
SimpleBitstreamCursor::Read was too large to inline into its
callers. Separate out the slow error path.
CTMark instructions:u: ThinLTO -0.23% (kimwitu++ -0.72%)
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
AliasAnalysis: Use SmallVectors in AAResults
AAResults is rebuilt for each function whenever AAManager is invalidated,
and the default pipeline adds 3 or 4 AA results to it. With std::vector
each one regrows its storage on the second and third addition.
callgrind instructions, opt -O3: kimwitu++ k.bc -0.45%, SPASS cnf.bc
-0.12%, sqlite3 -0.03%. CTMark instructions:u: O3 -0.02%, ThinLTO -0.01%.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
i missed a chunk when getting rid of the IFT_IEEE8023ADLAG fiddling
trunk_port_ioctl was checking that IFT_IEEE8023ADLAG was set on the
port, which isnt true anymore.
[ARM] Prevent debug values from causing extra Thumb1 spills (#237017)
Under Thumb1 execute-only code with an AAPCS frame chain, a debug value
for a stack-passed argument is represented with a fixed frame index.
canSpillOnFrameIndexAccess treats that debug-only operand as a real
access, so enabling debug info spills two additional callee-saved
registers.
Skip debug instructions in the scan. Keep a real stack-argument use
covered to ensure that frame-index elimination still reserves enough
registers.
Assisted-by: OpenAI Codex, co-reviewed by Claude and Yongqiang Tian.
[PowerPC] Model the CR defs of MTCRF used to restore callee-saved CRs
The epilogue restores the non-volatile CR fields (CR2-CR4) with a single
mtcrf. MTCRF takes only an FXM mask immediate and a GPR, and declares no
CR operands, so the post-RA scheduler sees no dependency between the
restore and instructions that read or write the restored CR bits. It can
therefore hoist the restore above those reads, making the function use the
caller's condition bits instead of its own.
Add the restored CR fields as implicit defs when building the MTCRF in
emitEpilogue() and restoreCRs(), matching the way the prologue already
adds implicit uses to MFCR. The scheduler now models the WAR/WAW
dependencies and keeps the restore after the last read.
This is a regression from #202339 (3fc6711ccaf6), which replaced multiple
MTOCRF instructions -- each with a CR field def -- with a single MTCRF.
Fixes #242250.
[LoongArch] Avoid left shift of negative immediates in foldLargeOffset() (#242761)
`ImmOp.getImm() << 12` is undefined when the LU12I.W immediate is
negative, e.g. `lu12i.w $a1, -524288` in `load_addr_offset_268435456`
(added by #242356), which UBSan reports on
sanitizer-aarch64-linux-bootstrap-ubsan.
dont switch if_type to IFT_IEEE8023ADLAG on ports anymore.
if_type should be immutable and set by the driver providing the
interface.
from what i can tell, the main reason to do this was to mark an
interfaces as "in use" by trunk, but we can figure that out by using
ac_trport now.
RISCV: Migrate to LastSubtargetCache in getSubtargetImpl (#242559)
These already reused the last subtarget for functions with the same
function attribute set. Use LastSubtargetCache to additionally filter
to the subtarget relevant attributes and work towards all targets
using a common pattern.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>