LLVM/project 723b6a6mlir/include/mlir/Dialect/LLVMIR NVVMOps.td, mlir/lib/Dialect/LLVMIR/IR NVVMDialect.cpp

[MLIR][NVVM] Spell strict assembly properties directly

Bind every NVVM inherent property in its operation assembly format and
re-enable strict property parsing for the dialect. Use direct named clauses
for declarative formats and custom MMA parsers while retaining dictionaries
for discardable attributes.

Assisted-by: Codex
DeltaFile
+345-157mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+415-5mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+156-156mlir/test/Target/LLVMIR/nvvm/tcgen05-mma-tensor.mlir
+156-156mlir/test/Target/LLVMIR/nvvm/tcgen05-mma-sp-tensor.mlir
+128-128mlir/test/Target/LLVMIR/nvvm/tma_store_reduce.mlir
+29-203mlir/test/Target/LLVMIR/nvvm/mma-sparse-blockscale.mlir
+1,229-805100 files not shown
+3,505-4,033106 files

LLVM/project 82b12a8llvm/test/CodeGen/X86 pdep-vector-128.ll pext-vector-128.ll

[DAG] expandPEXT/PDEP - scalarize vector instructions if the scalar type is legal (#216567)

If the scalar instruction is legal, just unroll (scalarize) - similar to
what a lot of other generic expansions already do.

Helps x86/BMI2 targets at least for vXi32/i64 types - there's more we
can do to address vXi8/i16 types and slow-PDEP/PEXT cases (znver1/2
etc.) but they can be addressed later with x86 specific lowering after
we have the generic base in place.

Fixes #214508
DeltaFile
+226-822llvm/test/CodeGen/X86/pext-vector-512.ll
+227-816llvm/test/CodeGen/X86/pdep-vector-512.ll
+111-460llvm/test/CodeGen/X86/pext-vector-256.ll
+111-453llvm/test/CodeGen/X86/pdep-vector-256.ll
+48-328llvm/test/CodeGen/X86/pext-vector-128.ll
+47-320llvm/test/CodeGen/X86/pdep-vector-128.ll
+770-3,1991 files not shown
+778-3,1997 files

LLVM/project 3d3203aclang/lib/CIR/Dialect/Transforms CIRSimplify.cpp, clang/test/CIR/Transforms constant-load-fold.cpp constant-load-fold.cir

[CIR] Fold load from constant alloca slots (#212284)

This patch folds non-volatile non-atomic `cir.load` operation that loads
from a constant alloca slot into the initial value stored into that
slot, if the initialization dominates the load.

This effectively enables "constant folding" at the C/C++ language level.
Consider the following C/C++ source program:

```cpp
int g();
void use(int);

void h(const int *);   // <-- The body of h is external.
void f() {
  const int x = g();
  h(&x);
  use(x);
}

    [8 lines not shown]
DeltaFile
+140-0clang/test/CIR/Transforms/constant-load-fold.cir
+97-0clang/lib/CIR/Dialect/Transforms/CIRSimplify.cpp
+38-0clang/test/CIR/Transforms/constant-load-fold.cpp
+275-03 files

LLVM/project 4c5182ellvm/include/llvm/Transforms/Vectorize/SandboxVectorizer Scheduler.h DependencyGraph.h, llvm/lib/Transforms/Vectorize/SandboxVectorizer Scheduler.cpp DependencyGraph.cpp

[SandboxVec][DAG][NFC] Replace UnscheduledSuccs/Preds with a single variable (#215364)

This is a cleanup patch that replaces the two DAG node unscheduled
dependency counters (that is UnscheduledSuccs and UnscheduledPreds) with
a single one named UnscheduledDeps.

The reasoning is that scheduling operates on one direction at a time so
if we are scheduling bottom-up then we only need the unscheduled
successors, and if we schedule top-down then we only need the
unscheduled predecessors.
DeltaFile
+218-122llvm/unittests/Transforms/Vectorize/SandboxVectorizer/DependencyGraphTest.cpp
+32-39llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h
+25-17llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp
+10-13llvm/lib/Transforms/Vectorize/SandboxVectorizer/Scheduler.cpp
+6-9llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp
+1-4llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Scheduler.h
+292-2046 files

LLVM/project 860fcb7clang/test/CodeGen/Sparc variadic-aggregate.c

[Sparc][NFC] test sparc variadic aggregate handling (#216521)

equivalent of https://github.com/llvm/llvm-project/pull/216509 for
sparc. It similarly has some bugs passing aggregates with floats.
DeltaFile
+1,015-0clang/test/CodeGen/Sparc/variadic-aggregate.c
+1,015-01 files

LLVM/project e65f3c1clang/include/clang/Basic DiagnosticSemaKinds.td, clang/lib/Sema SemaExprCXX.cpp

[Clang] Accept auto casts pre-C++23 as an extension (#200675)

GCC already supports this as an extension pre-C++23. It is also useful
for libc++ to replace `_LIBCPP_AUTO_CAST`.

Fixes #115609
DeltaFile
+22-21clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.auto.deduct/p2.cpp
+19-18clang/test/CXX/expr/expr.post/expr.type.conv/p1-2b.cpp
+10-15clang/test/Parser/cxx2b-auto-x.cpp
+3-4clang/lib/Sema/SemaExprCXX.cpp
+4-3clang/test/Parser/cxx1z-decomposition.cpp
+2-3clang/include/clang/Basic/DiagnosticSemaKinds.td
+60-647 files not shown
+68-7213 files

LLVM/project c27a08alibcxx/include tuple, libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply make_from_tuple.pass.cpp

[libc++] Simplify the implementation of std::make_from_tuple (#215067)

This does two major things:
1) It removes conditionals for C++20/pre-C++20. I don't understand why
this has ever been done. This made the implementation significantly more
complicated without any indication that it actually improved anything.
2) std::apply is used for expanding the tuple
DeltaFile
+28-51libcxx/include/tuple
+0-39libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
+28-902 files

LLVM/project 2d70006compiler-rt/test/asan/TestCases invalid-pointer-pairs-vector-extract.cpp

[ASan] Add xfail test for PR #213546 (#216532)

Add xfail test for PR #213546
DeltaFile
+35-0compiler-rt/test/asan/TestCases/invalid-pointer-pairs-vector-extract.cpp
+35-01 files

LLVM/project df9a00dclang/include/clang/CIR MissingFeatures.h, clang/lib/CIR/CodeGen/Targets NVPTX.cpp

[CIR][NVPTX] Handle CUDALaunchBoundsAttr (#216447)

Source(s):
*
https://github.com/llvm/llvm-project/blob/34cce43ff1918e621ab08411fa7bc0e2ac4165b4/clang/lib/CodeGen/Targets/NVPTX.cpp#L242

*
https://github.com/llvm/llvm-project/blob/34cce43ff1918e621ab08411fa7bc0e2ac4165b4/clang/test/CodeGenCUDA/launch-bounds.cu#L4
DeltaFile
+193-0clang/test/CIR/CodeGenCUDA/launch-bounds.cu
+40-2clang/lib/CIR/CodeGen/Targets/NVPTX.cpp
+0-1clang/include/clang/CIR/MissingFeatures.h
+233-33 files

LLVM/project 09e459bllvm/lib/Target/X86 X86InstrInfo.cpp, llvm/test/CodeGen/X86 optimize-compare-undef.mir

X86: Fix optimizeCompareInstr crash on a compare from an undef register (#216540)
DeltaFile
+23-0llvm/test/CodeGen/X86/optimize-compare-undef.mir
+2-1llvm/lib/Target/X86/X86InstrInfo.cpp
+25-12 files

LLVM/project ee7f9bclldb/source/Utility Log.cpp, lldb/unittests/Utility LogTest.cpp

[lldb] Fix invalid UTF-8 in JSON log message (#216185)

Enabling the JSON packet log part way through a session aborts an
assertions build:

```
(lldb) b f
(lldb) run
(lldb) log enable -j -f /tmp/pk.json gdb-remote packets
(lldb) next
Assertion failed: (false && "Invalid UTF-8 in value used as JSON"), function Value, file JSON.h, line 333.
```

`Log::EmitJSONMessage` passed the message straight to
`llvm::json::Value`,
which asserts on ill-formed UTF-8 and only then falls back to `fixUTF8`.
So a release build repairs the message while an assertions build dies.

The bytes come from the saved packets.  Once logging is turned on,

    [10 lines not shown]
DeltaFile
+29-0lldb/unittests/Utility/LogTest.cpp
+5-1lldb/source/Utility/Log.cpp
+34-12 files

LLVM/project ad7345allvm/lib/CodeGen PeepholeOptimizer.cpp, llvm/test/CodeGen/X86 peephole-valuetracker-undef.mir

PeepholeOpt: Fix crash on copy from an undef register (#216539)
DeltaFile
+17-0llvm/test/CodeGen/X86/peephole-valuetracker-undef.mir
+5-2llvm/lib/CodeGen/PeepholeOptimizer.cpp
+22-22 files

LLVM/project e6b3396clang/lib/AST/ByteCode InterpBuiltin.cpp, clang/test/AST/ByteCode builtin-functions.cpp

[clang][bytecode] check reduce_min element type (#216536)

Only integer types are allowed.
DeltaFile
+5-0clang/test/AST/ByteCode/builtin-functions.cpp
+3-0clang/lib/AST/ByteCode/InterpBuiltin.cpp
+8-02 files

LLVM/project 044118fclang/lib/Sema SemaTemplateDeduction.cpp SemaTemplateInstantiateDecl.cpp, clang/test/CXX/temp/temp.decls/temp.friend p5.cpp

Revert "[Clang] Support friend declarations with a dependent nested-name-specifier" (#216549)

Reverts llvm/llvm-project#208345

---

Revert dependent friend support due to GCC build failure
DeltaFile
+13-1,089clang/test/CXX/temp/temp.decls/temp.friend/p5.cpp
+105-685clang/lib/Sema/SemaAccess.cpp
+122-298clang/lib/Sema/SemaDeclCXX.cpp
+74-336clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+0-263clang/test/SemaTemplate/dependent-friend-constraints.cpp
+37-191clang/lib/Sema/SemaTemplateDeduction.cpp
+351-2,86258 files not shown
+743-3,98564 files

LLVM/project 8c64b15llvm/lib/Transforms/Vectorize VectorCombine.cpp, llvm/test/Transforms/VectorCombine load-insert-store-invariant-group.ll

[VectorCombine] Drop invariant.group from scalarized stores (#212473)

!invariant.group is tied to a pointer SSA value, so it cannot be copied
from a vector store to a scalar store that uses a newly created GEP.
Drop the metadata after copying the remaining store metadata and update
the regression expectations.

Fixes https://github.com/llvm/llvm-project/issues/212472

Assisted-by: Codex
DeltaFile
+62-0llvm/test/Transforms/VectorCombine/load-insert-store-invariant-group.ll
+3-0llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+65-02 files

LLVM/project f63a0e9clang/lib/AST/ByteCode Compiler.cpp, clang/test/AST/ByteCode cxx23.cpp

[clang][bytecode] Fix assertion failure in in valid continue stmt (#216547)

We need to handle the missing TargetLabel here, similarly to what we do
in break statements.
DeltaFile
+13-0clang/test/AST/ByteCode/cxx23.cpp
+3-1clang/lib/AST/ByteCode/Compiler.cpp
+16-12 files

LLVM/project cbd8145mlir/include/mlir/Dialect/LLVMIR LLVMAttrDefs.td, mlir/lib/Dialect/LLVMIR/IR LLVMAttrs.cpp

[MLIR][LLVM] Preserve pointer-valued metadata operands on import (#215743)

convertMetadataToAttrImpl only modelled ConstantInt operands wrapped in
a ConstantAsMetadata, so any metadata node containing a pointer constant
could not be represented and the whole node was rejected.

Add #llvm.md_null and #llvm.md_addrspacecast to model
ConstantPointerNull and addrspacecast constant expressions, keeping the
address space so that `ptr null` and `ptr addrspace(1) null` stay
distinct. MDAddrSpaceCastAttr verifies that its operand is itself
pointer-valued metadata.

Global values are constants, so ValueAsMetadata::get wraps them in a
ConstantAsMetadata and they never reached the ValueAsMetadata case.
Match them in the ConstantAsMetadata case instead, which also
generalizes the existing function-only handling to any named global
value and makes the addrspacecast operand representable.

Mirror both attributes in ModuleTranslation::convertMetadataAttr so the

    [6 lines not shown]
DeltaFile
+70-0mlir/test/Target/LLVMIR/Import/intrinsic-unregistered.ll
+42-3mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
+22-6mlir/lib/Target/LLVMIR/ModuleImport.cpp
+17-0mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+16-0mlir/test/Dialect/LLVMIR/invalid.mlir
+16-0mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
+183-92 files not shown
+203-98 files

LLVM/project 97ef3d4llvm/lib/Transforms/InstCombine InstCombineShifts.cpp, llvm/test/Transforms/InstCombine shift-cttz-ctlz.ll shift.ll

[InstCombine] Fold shl of constant by cttz into multiply of lowest set bit (#214517)

Currently, `C << cttz(X, true)` generates a DeBruijn lookup table on
RV64I (13 instructions).
And this patch adds a fold in InstCombine:
  `C << cttz(X, true)  -->  (-X & X) * C`
This reduces the instruction count from 13 to 3 on RV64I.
The fold requires that cttz has a single use (to avoid increasing
instruction count)

Alive2 proof: https://alive2.llvm.org/ce/z/TmWxrT
DeltaFile
+82-2llvm/test/Transforms/InstCombine/shift.ll
+11-0llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
+6-4llvm/test/Transforms/InstCombine/shift-cttz-ctlz.ll
+99-63 files

LLVM/project 4d18b27clang/lib/Driver/ToolChains CommonArgs.cpp, clang/test/Driver cuda-flush-denormals-to-zero.cu amdgpu-xnack-sramecc-flags.c

clang/AMDGPU: Stop passing redundant -target-cpu to cc1

Now that the exact target is encoded in the triple's subarch field,
-target-cpu is redundant. This avoids polluting the resultant IR with
unwanted "target-cpu" attributes. The net result is the desired codegen
when compiling libraries for a major subarch and linking it into a
program compiled for a specific arch. e.g., compiling for "gfx9-generic"
would pollute the IR with "target-cpu"="gfx9-generic", so codegen
would ultimately be performed for the generic target even after
linking into the concrete gfx9 cpu. The specialization will now be
achieved by merging the triples without the linker or optimization
passes needing to fixup function attributes.
DeltaFile
+62-62clang/test/Driver/amdgpu-mcpu.cl
+26-26clang/test/Driver/hip-sanitize-options.hip
+12-16clang/test/Driver/hip-rdc-device-only.hip
+19-7clang/lib/Driver/ToolChains/CommonArgs.cpp
+10-10clang/test/Driver/amdgpu-xnack-sramecc-flags.c
+6-6clang/test/Driver/cuda-flush-denormals-to-zero.cu
+135-12726 files not shown
+189-20832 files

LLVM/project 74c1dccllvm/include/llvm/TargetParser AMDGPUTargetParser.h, llvm/lib/Target/AMDGPU AMDGPUTargetParser.td GCNProcessors.td

AMDGPU: Start using subarch in attributor instead of subtarget

Avoid querying the subtarget for functions when the relevant
properties are known from the triple. The various subtarget
group size functions should also be decoupled from the subtarget,
but those are trickier to untangle.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+26-18llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
+9-9llvm/lib/Target/AMDGPU/GCNProcessors.td
+15-1llvm/include/llvm/TargetParser/AMDGPUTargetParser.h
+10-0llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+2-0llvm/lib/Target/AMDGPU/AMDGPUTargetParser.td
+62-285 files

LLVM/project 75e3236clang/lib/Driver Driver.cpp, clang/lib/Driver/ToolChains CommonArgs.cpp

clang: Start using new amdgpu subarch triples

Fixup invocations using --target=amdgcn + -mcpu to introduce
the subarch in the triple.

For offload toolchains, a single toolchain is constructed for the
top level amdgpu architecture, and the effective triple is used for
target specific tool invocations.

The specifics of the resource directory layout are tbd. This does
try to find resources in the subarch named directory. The paths
are searched at toolchain creation time, so that does not work
when there are multiple subarches.

Fixes #154925
DeltaFile
+59-59clang/test/Driver/offload-arch-translation-amdgpu.cu
+43-43clang/test/Driver/hip-phases.hip
+33-33clang/test/Driver/hip-binding.hip
+48-14clang/lib/Driver/ToolChains/CommonArgs.cpp
+43-12clang/lib/Driver/Driver.cpp
+54-0clang/test/CodeGen/amdgpu-builtin-processor-is-subarch.c
+280-161104 files not shown
+992-497110 files

LLVM/project 57a04e1clang/lib/Sema SemaTemplateDeduction.cpp SemaTemplateInstantiateDecl.cpp, clang/test/CXX/temp/temp.decls/temp.friend p5.cpp

Revert "[Clang] Support friend declarations with a dependent nested-name-spec…"

This reverts commit 0b672437c396b700fdb94bd64b176b33f084053b.
DeltaFile
+13-1,089clang/test/CXX/temp/temp.decls/temp.friend/p5.cpp
+105-685clang/lib/Sema/SemaAccess.cpp
+122-298clang/lib/Sema/SemaDeclCXX.cpp
+74-336clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+0-263clang/test/SemaTemplate/dependent-friend-constraints.cpp
+37-191clang/lib/Sema/SemaTemplateDeduction.cpp
+351-2,86258 files not shown
+743-3,98564 files

LLVM/project 0b67243clang/lib/Sema SemaTemplateDeduction.cpp SemaTemplateInstantiateDecl.cpp, clang/test/CXX/temp/temp.decls/temp.friend p5.cpp

[Clang] Support friend declarations with a dependent nested-name-specifier (#208345)

Fixes https://github.com/llvm/llvm-project/issues/104057

---

This patch adds support for friend declarations with a dependent NNS
DeltaFile
+1,089-13clang/test/CXX/temp/temp.decls/temp.friend/p5.cpp
+685-105clang/lib/Sema/SemaAccess.cpp
+299-123clang/lib/Sema/SemaDeclCXX.cpp
+334-72clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+263-0clang/test/SemaTemplate/dependent-friend-constraints.cpp
+191-37clang/lib/Sema/SemaTemplateDeduction.cpp
+2,861-35058 files not shown
+3,985-74364 files

LLVM/project d0b3f80llvm/include/llvm/TargetParser AMDGPUTargetParser.h, llvm/lib/Target/AMDGPU AMDGPUTargetParser.td GCNProcessors.td

AMDGPU: Start using subarch in attributor instead of subtarget

Avoid querying the subtarget for functions when the relevant
properties are known from the triple. The various subtarget
group size functions should also be decoupled from the subtarget,
but those are trickier to untangle.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+26-18llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
+9-9llvm/lib/Target/AMDGPU/GCNProcessors.td
+15-1llvm/include/llvm/TargetParser/AMDGPUTargetParser.h
+10-0llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+2-0llvm/lib/Target/AMDGPU/AMDGPUTargetParser.td
+62-285 files

LLVM/project e45007cclang/lib/Driver/ToolChains CommonArgs.cpp, clang/test/Driver cuda-flush-denormals-to-zero.cu amdgpu-xnack-sramecc-flags.c

clang/AMDGPU: Stop passing redundant -target-cpu to cc1

Now that the exact target is encoded in the triple's subarch field,
-target-cpu is redundant. This avoids polluting the resultant IR with
unwanted "target-cpu" attributes. The net result is the desired codegen
when compiling libraries for a major subarch and linking it into a
program compiled for a specific arch. e.g., compiling for "gfx9-generic"
would pollute the IR with "target-cpu"="gfx9-generic", so codegen
would ultimately be performed for the generic target even after
linking into the concrete gfx9 cpu. The specialization will now be
achieved by merging the triples without the linker or optimization
passes needing to fixup function attributes.
DeltaFile
+62-62clang/test/Driver/amdgpu-mcpu.cl
+26-26clang/test/Driver/hip-sanitize-options.hip
+12-16clang/test/Driver/hip-rdc-device-only.hip
+19-7clang/lib/Driver/ToolChains/CommonArgs.cpp
+10-10clang/test/Driver/amdgpu-xnack-sramecc-flags.c
+6-6clang/test/Driver/cuda-flush-denormals-to-zero.cu
+135-12726 files not shown
+189-20832 files

LLVM/project 0315632clang/lib/Driver Driver.cpp, clang/lib/Driver/ToolChains CommonArgs.cpp

clang: Start using new amdgpu subarch triples

Fixup invocations using --target=amdgcn + -mcpu to introduce
the subarch in the triple.

For offload toolchains, a single toolchain is constructed for the
top level amdgpu architecture, and the effective triple is used for
target specific tool invocations.

The specifics of the resource directory layout are tbd. This does
try to find resources in the subarch named directory. The paths
are searched at toolchain creation time, so that does not work
when there are multiple subarches.

Fixes #154925
DeltaFile
+59-59clang/test/Driver/offload-arch-translation-amdgpu.cu
+43-43clang/test/Driver/hip-phases.hip
+33-33clang/test/Driver/hip-binding.hip
+48-14clang/lib/Driver/ToolChains/CommonArgs.cpp
+43-12clang/lib/Driver/Driver.cpp
+27-27clang/test/Driver/hip-options.hip
+253-188104 files not shown
+989-497110 files

LLVM/project b4c2e90llvm/include/llvm/CodeGen/GlobalISel MIPatternMatch.h, llvm/lib/Target/AArch64/GISel AArch64PostLegalizerCombiner.cpp

AArch64: Use MIPatternMatch in PostLegalizerCombiner ext checks (#216512)

Replace the getVRegDef + opcode-check idiom with mi_match. Add an
m_GSExtInReg matcher for G_SEXT_INREG, which has an extra immediate
operand and so does not fit the plain unary-op matcher shape.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+21-0llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
+3-3llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
+24-32 files

LLVM/project de0f427llvm/lib/CodeGen/GlobalISel Utils.cpp LegalizerHelper.cpp

GlobalISel: Use m_GImplicitDef instead of getVRegDef opcode checks (#216513)

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+1-2llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+1-1llvm/lib/CodeGen/GlobalISel/Utils.cpp
+2-32 files

LLVM/project 48030bdllvm/lib/Target/RISCV/GISel RISCVLegalizerInfo.cpp

RISCV: Use m_GImplicitDef instead of getVRegDef + opcode check (#216514)

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+3-2llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
+3-21 files

LLVM/project 1d1a003llvm/lib/Target/X86 X86InstrInfo.cpp, llvm/test/CodeGen/X86 optimize-compare-undef.mir

X86: Fix optimizeCompareInstr crash on a compare from an undef register

getVRegDef returns null for undef sources, so the assert would fire.
Found by AI while working on other stuff.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+23-0llvm/test/CodeGen/X86/optimize-compare-undef.mir
+2-1llvm/lib/Target/X86/X86InstrInfo.cpp
+25-12 files