LLVM/project 750088fllvm/docs ReleaseNotes.md, llvm/include/llvm/IR Instructions.h

[IR] Make BranchInst operand order consistent (#186609)

Ensure that successors are always reported in the same order in which
they are stored in the operand list.
DeltaFile
+7-7llvm/unittests/IR/InstructionsTest.cpp
+8-0llvm/docs/ReleaseNotes.md
+3-3llvm/tools/llvm-c-test/echo.cpp
+3-3llvm/unittests/SandboxIR/SandboxIRTest.cpp
+2-2llvm/lib/IR/Instructions.cpp
+2-2llvm/include/llvm/IR/Instructions.h
+25-171 files not shown
+26-187 files

LLVM/project 8f21b65clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR] Split CIR_UnaryOp into individual operations

Split the monolithic cir.unary operation (which dispatched on a
UnaryOpKind enum) into four separate operations: cir.inc, cir.dec,
cir.minus, and cir.not.

This follows the same pattern used when cir.binop was split into
individual binary operations (AddOp, SubOp, etc.).

Changes:
- Add CIR_UnaryOpInterface with getInput()/getResult() methods
- Add CIR_UnaryOp and CIR_UnaryOpWithOverflowFlag base classes
- Define IncOp, DecOp, MinusOp, NotOp with per-op folds
- Add Involution trait to NotOp for not(not(x)) -> x folding
- Replace createUnaryOp() with createInc/Dec/Minus/Not builders
- Split LLVM lowering into four separate patterns
- Split LoweringPrepare complex-type handling per unary op
- Update CIRCanonicalize and CIRSimplify for new op types
- Update all codegen files to use bool params instead of UnaryOpKind

    [6 lines not shown]
DeltaFile
+91-105clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+56-88clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+111-28clang/include/clang/CIR/Dialect/IR/CIROps.td
+62-62clang/test/CIR/CodeGenOpenACC/private-clause-pointer-array-recipes-CtorDtor.cpp
+41-41clang/test/CIR/CodeGenOpenACC/private-clause-pointer-array-recipes-NoOps.cpp
+36-36clang/test/CIR/CodeGenOpenACC/combined-reduction-clause-inline-ops.cpp
+397-36078 files not shown
+1,393-1,36784 files

LLVM/project d3537f7clang/lib/CIR/CodeGen CIRGenExprComplex.cpp CIRGenExprScalar.cpp, clang/lib/CodeGen CGExprComplex.cpp

[CIR] Remove cir.unary(plus, ...) and emit nothing for unary plus

Traditional codegen never emits any operation for unary plus — it just
visits the subexpression as a pure identity at the codegen level. Align
CIRGen with this behavior by removing Plus from UnaryOpKind entirely
and having VisitUnaryPlus directly visit the subexpression with the
appropriate promotion/demotion handling.
DeltaFile
+68-67clang/lib/CodeGen/CGExprComplex.cpp
+0-72clang/test/CIR/Transforms/canonicalize.cir
+10-26clang/test/CIR/CodeGen/complex-unary.cpp
+16-20clang/test/CIR/IR/unary.cir
+18-16clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp
+14-12clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+126-21310 files not shown
+146-28316 files

LLVM/project 361641dclang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/Transforms CIRCanonicalize.cpp

[CIR] Add cir.min op and refactor cir.max lowering (#185276)

Add cir.min operation for integer minimum computation. Refactor cir.max
lowering into a shared lowerMinMaxOp template reused by both ops.
DeltaFile
+77-0clang/test/CIR/Transforms/max-min-idempotent.cir
+26-1clang/include/clang/CIR/Dialect/IR/CIROps.td
+20-5clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+24-0clang/test/CIR/Lowering/binop-int-vector.cir
+5-5clang/lib/CIR/Dialect/Transforms/CIRCanonicalize.cpp
+3-0clang/test/CIR/Lowering/binop-unsigned-int.cir
+155-111 files not shown
+157-117 files

LLVM/project ce7a582llvm/lib/Transforms/Instrumentation MemorySanitizer.cpp

[msan][NFCI] Replace unnecessary shadow cast with assertion (#186498)

Fabian Wolff pointed out that #176031 made the output of CreateIntCast()
unused in handleBitwiseAnd().

Upon closer inspection, the CreateIntCast()s are unnecessary, because the
arguments to handleBitwiseAnd() (and visitOr()) are integers or vectors of
integers, for which the shadow types are the same as the original types.
This patch removes the unnecessary if and shadow cast, and adds
assertions.
DeltaFile
+21-9llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+21-91 files

LLVM/project 9422bd3llvm/include/llvm/IR Instructions.h Instruction.h, llvm/include/llvm/SandboxIR Instruction.h

[IR] Add Instruction::successors() (#186606)

Nowadays all terminators store all successor operands consecutively, so
we can expose the range of successors through a unified interface.

Rename succ_op_iterator to succ_iterator for consistency, also with
Machine IR.

Preliminary work for replacing the succ_iterator in CFG.h with an
iterator that iterates directly over the uses.
DeltaFile
+87-84llvm/include/llvm/IR/Instructions.h
+38-0llvm/include/llvm/IR/Instruction.h
+17-4llvm/lib/IR/Instruction.cpp
+4-5llvm/include/llvm/SandboxIR/Instruction.h
+146-934 files

LLVM/project f002fc0lldb/packages/Python/lldbsuite/test decorators.py dotest_args.py, lldb/test/API lit.cfg.py

[lldb] Skip tests that are incompatible with MTE (#186043)

Skip tests that are incompatible with MTE. 

Depends on:
- https://github.com/llvm/llvm-project/pull/185780
DeltaFile
+10-1lldb/test/API/macosx/mte/TestDarwinMTE.py
+11-0lldb/packages/Python/lldbsuite/test/decorators.py
+6-0lldb/packages/Python/lldbsuite/test/dotest_args.py
+3-0lldb/test/API/lit.cfg.py
+3-0lldb/packages/Python/lldbsuite/test/configuration.py
+3-0lldb/test/Shell/lit.cfg.py
+36-118 files not shown
+58-124 files

LLVM/project 1eee115lldb/tools/lldb-server lldb-platform.cpp lldb-gdbserver.cpp

[lldb] Rename Status variables to avoid confusion (NFC) (#186486)

Rename Status variables that are named `error` to `status` to avoid
confusion with llvm::Error as the latter becomes more and more
prevalent.
DeltaFile
+57-58lldb/tools/lldb-server/lldb-platform.cpp
+18-18lldb/tools/lldb-server/lldb-gdbserver.cpp
+75-762 files

LLVM/project 9d4436ellvm/test/MC/AArch64 cyclone-movi-bug.s, llvm/test/MC/X86 intel-syntax-branch.s intel-syntax-hex.s

[llvm-mc] Default output assembly variant to AssemblerDialect (#186317)

Previously, llvm-mc always defaulted to output assembly variant 0
regardless of the target's AssemblerDialect. This was inconsistent:
llvm-mc -x86-asm-syntax=intel changed the input parser to Intel syntax
but output stayed AT&T, unlike clang's -masm=intel which affects both.

When --output-asm-variant is not explicitly specified, fall back to
MAI->getAssemblerDialect() instead of hardcoding variant 0. This
makes the output match the target's configured dialect:

- X86: -x86-asm-syntax=intel now produces Intel output
- AArch64: Apple triples default to Apple syntax output
- SystemZ: z/OS triples default to HLASM syntax output

Tests that relied on a specific output variant now use explicit
--output-asm-variant=0.
DeltaFile
+7-4llvm/tools/llvm-mc/llvm-mc.cpp
+10-0llvm/test/tools/llvm-mc/x86-asm-syntax.test
+3-3llvm/test/MC/X86/intel-syntax-branch.s
+2-2llvm/test/MC/AArch64/cyclone-movi-bug.s
+1-1llvm/test/MC/X86/intel-syntax-hex.s
+1-1llvm/test/MC/X86/intel-syntax-movabs-large.s
+24-1110 files not shown
+34-2116 files

LLVM/project d6246f6llvm/lib/Target/X86 X86AsmPrinter.cpp, llvm/test/CodeGen/X86 asm-modifier-error.ll inline-asm-p-constraint.ll

[X86] Reject 'p' constraint without 'a' modifier in inline asm (#185799)

The 'p' constraint produces an address operand that should only be
printed with the 'a' modifier (e.g., %a0). Without it, GCC and Clang
produce different and arguably incorrect output

https://github.com/llvm/llvm-project/issues/185343#issuecomment-4029670370
Reject the combination to catch misuse early.
DeltaFile
+6-0llvm/test/CodeGen/X86/asm-modifier-error.ll
+5-0llvm/lib/Target/X86/X86AsmPrinter.cpp
+2-3llvm/test/CodeGen/X86/inline-asm-p-constraint.ll
+13-33 files

LLVM/project 4a2e169llvm/lib/Target/WebAssembly WebAssemblyFastISel.cpp, llvm/test/CodeGen/WebAssembly fast-isel.ll

[WebAssembly][NFC] Rename and test FastISel selectBr (#186577)

selectBr only handles conditional branches and also wasn't tested.
Clarify the name and add test that enforces that there's no fallback.
DeltaFile
+17-2llvm/test/CodeGen/WebAssembly/fast-isel.ll
+3-3llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
+20-52 files

LLVM/project 464639bllvm/include/llvm/IR Instructions.h

[IR][NFC] Remove BranchInst successor functions (#186604)

The efficient access is now handled by UncondBrInst/CondBrInst,
Instruction functions handle the more generic cases. These functions are
now largely unused now that most uses of BranchInst are gone.

Preliminary work for making the CondBrInst operand order consistent.
DeltaFile
+0-12llvm/include/llvm/IR/Instructions.h
+0-121 files

LLVM/project efcd3b6llvm/lib/Transforms/IPO AttributorAttributes.cpp IROutliner.cpp, llvm/lib/Transforms/Instrumentation ControlHeightReduction.cpp

[IPO][InstCombine][Vectorize][NFCI] Drop uses of BranchInst (#186596)

Refactor remaining parts of Transforms apart from Scalar and Utils.
DeltaFile
+28-36llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
+31-25llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+13-41llvm/lib/Transforms/IPO/IROutliner.cpp
+20-32llvm/lib/Transforms/Vectorize/LoopIdiomVectorize.cpp
+20-21llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+14-16llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+126-17124 files not shown
+221-28430 files

LLVM/project 4aa4354clang/lib/CIR/CodeGen CIRGenExprComplex.cpp CIRGenExprScalar.cpp, clang/lib/CodeGen CGExprComplex.cpp

[CIR] Remove cir.unary(plus, ...) and emit nothing for unary plus

Traditional codegen never emits any operation for unary plus — it just
visits the subexpression as a pure identity at the codegen level. Align
CIRGen with this behavior by removing Plus from UnaryOpKind entirely
and having VisitUnaryPlus directly visit the subexpression with the
appropriate promotion/demotion handling.
DeltaFile
+68-67clang/lib/CodeGen/CGExprComplex.cpp
+0-72clang/test/CIR/Transforms/canonicalize.cir
+10-26clang/test/CIR/CodeGen/complex-unary.cpp
+16-20clang/test/CIR/IR/unary.cir
+18-16clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp
+14-12clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+126-21310 files not shown
+146-28316 files

LLVM/project 0871762clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR] Split CIR_UnaryOp into individual operations

Split the monolithic cir.unary operation (which dispatched on a
UnaryOpKind enum) into four separate operations: cir.inc, cir.dec,
cir.minus, and cir.not.

This follows the same pattern used when cir.binop was split into
individual binary operations (AddOp, SubOp, etc.).

Changes:
- Add CIR_UnaryOpInterface with getInput()/getResult() methods
- Add CIR_UnaryOp and CIR_UnaryOpWithOverflowFlag base classes
- Define IncOp, DecOp, MinusOp, NotOp with per-op folds
- Add Involution trait to NotOp for not(not(x)) -> x folding
- Replace createUnaryOp() with createInc/Dec/Minus/Not builders
- Split LLVM lowering into four separate patterns
- Split LoweringPrepare complex-type handling per unary op
- Update CIRCanonicalize and CIRSimplify for new op types
- Update all codegen files to use bool params instead of UnaryOpKind

    [6 lines not shown]
DeltaFile
+91-105clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+56-88clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+111-28clang/include/clang/CIR/Dialect/IR/CIROps.td
+62-62clang/test/CIR/CodeGenOpenACC/private-clause-pointer-array-recipes-CtorDtor.cpp
+41-41clang/test/CIR/CodeGenOpenACC/private-clause-pointer-array-recipes-NoOps.cpp
+36-36clang/test/CIR/CodeGenOpenACC/compute-reduction-clause-inline-ops.cpp
+397-36078 files not shown
+1,393-1,36784 files

LLVM/project b26d3e9clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/Transforms CIRCanonicalize.cpp

[CIR] Add cir.min op and refactor cir.max lowering

Add cir.min operation for integer minimum computation. Refactor cir.max
lowering into a shared lowerMinMaxOp template reused by both ops. Includes
lowering tests for signed, unsigned, and vector types, plus canonicalization
tests.
DeltaFile
+77-0clang/test/CIR/Transforms/max-min-idempotent.cir
+26-1clang/include/clang/CIR/Dialect/IR/CIROps.td
+20-5clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+24-0clang/test/CIR/Lowering/binop-int-vector.cir
+5-5clang/lib/CIR/Dialect/Transforms/CIRCanonicalize.cpp
+3-0clang/test/CIR/Lowering/binop-unsigned-int.cir
+155-111 files not shown
+157-117 files

LLVM/project 1b29ac1llvm/lib/Transforms/Vectorize LoopVectorize.cpp VPlanConstruction.cpp, llvm/unittests/Transforms/Vectorize VPlanTestBase.h

[LV] Move predication, early exit & region handling to VPlan0 (NFCI) (#185305)

Move handleEarlyExits, predication and region creation to operate
directly on VPlan0. This means they only have to run once, reducing
compile time a bit; the relative order remains unchanged.

Introducing the regions at this point in particular unlocks performing
more transforms once, on the initial VPlan, instead of running them for
each VF.

Whether a scalar epilogue is required is still determined by legacy cost
model, so we need to still account for that in the VF specific VPlan
logic.

PR: https://github.com/llvm/llvm-project/pull/185305
DeltaFile
+16-15llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+2-6llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+1-3llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+1-1llvm/unittests/Transforms/Vectorize/VPlanTestBase.h
+20-254 files

LLVM/project c6811cdllvm/lib/Transforms/Scalar StructurizeCFG.cpp JumpThreading.cpp

[Transforms/Scalar][NFC] Drop uses of BranchInst (#186592)

I ended up relaxing some of the checks that LoopInterchange made, the
assumptions that certain instructions were branches seemed to not be
used at all.
DeltaFile
+40-53llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
+43-47llvm/lib/Transforms/Scalar/JumpThreading.cpp
+34-43llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
+35-40llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+22-30llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+20-23llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+194-23631 files not shown
+331-41337 files

LLVM/project 4cc040fclang-tools-extra/clang-tidy/readability ElseAfterReturnCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix false positive in `readability-else-after-return` on `return` jumped over by `goto` (#186370)

Given this code:

```cpp
if (...) {
  goto skip_over_return;
  return;
skip_over_return:
  foo();
} else {
  ...
}
```

...the check suggests removing the `else`, which is not a valid
transformation. This is because it looks at *all* the substatements of
the then-branch for interrupting statements. This PR changes it to only
look at the *final* substatement.

    [17 lines not shown]
DeltaFile
+43-4clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return.cpp
+18-7clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp
+22-0clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return-cxx20.cpp
+3-0clang-tools-extra/docs/ReleaseNotes.rst
+86-114 files

LLVM/project 38713d2clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/Transforms CIRCanonicalize.cpp

[CIR] Add Commutative/Idempotent traits to binary ops (#185163)

Add missing MLIR traits to CIR binary operations:

- AndOp, OrOp: Commutative, Idempotent
- AddOp, MulOp, XorOp, MaxOp: Commutative

Add these ops to the CIRCanonicalize pass op list so trait-based
folding is exercised by applyOpPatternsGreedily.
DeltaFile
+49-0clang/test/CIR/Transforms/binop-traits.cir
+28-18clang/test/CIR/CodeGen/binop.cpp
+10-6clang/include/clang/CIR/Dialect/IR/CIROps.td
+6-5clang/lib/CIR/Dialect/Transforms/CIRCanonicalize.cpp
+2-7clang/test/CIR/CodeGen/new.cpp
+2-2clang/test/CIR/CodeGen/size-of-vla.cpp
+97-382 files not shown
+100-438 files

LLVM/project f1f71fbclang/test/Driver riscv-cpus.c, clang/test/Driver/print-enabled-extensions riscv-spacemit-x60.c

[RISCV][NFC] Move extension test for spacemit-x60 to a separate file (#186357)
DeltaFile
+70-0clang/test/Driver/print-enabled-extensions/riscv-spacemit-x60.c
+5-54clang/test/Driver/riscv-cpus.c
+75-542 files

LLVM/project c389129clang/test/Driver/print-enabled-extensions riscv-spacemit-x100.c, llvm/lib/Target/RISCV RISCVProcessors.td

[RISCV] Add more extensions to spacemit-x100 (#186351)
DeltaFile
+28-1clang/test/Driver/print-enabled-extensions/riscv-spacemit-x100.c
+6-2llvm/lib/Target/RISCV/RISCVProcessors.td
+34-32 files

LLVM/project 1b87510clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/Transforms CIRCanonicalize.cpp

[CIR] Add cir.min op and refactor cir.max lowering

Add cir.min operation for integer minimum computation. Refactor cir.max
lowering into a shared lowerMinMaxOp template reused by both ops. Includes
lowering tests for signed, unsigned, and vector types, plus canonicalization
tests.
DeltaFile
+77-0clang/test/CIR/Transforms/max-min-idempotent.cir
+26-1clang/include/clang/CIR/Dialect/IR/CIROps.td
+20-5clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+24-0clang/test/CIR/Lowering/binop-int-vector.cir
+5-5clang/lib/CIR/Dialect/Transforms/CIRCanonicalize.cpp
+3-0clang/test/CIR/Lowering/binop-unsigned-int.cir
+155-111 files not shown
+157-117 files

LLVM/project 3b05cd8clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR] Split CIR_UnaryOp into individual operations

Split the monolithic cir.unary operation (which dispatched on a
UnaryOpKind enum) into four separate operations: cir.inc, cir.dec,
cir.minus, and cir.not.

This follows the same pattern used when cir.binop was split into
individual binary operations (AddOp, SubOp, etc.).

Changes:
- Add CIR_UnaryOpInterface with getInput()/getResult() methods
- Add CIR_UnaryOp and CIR_UnaryOpWithOverflowFlag base classes
- Define IncOp, DecOp, MinusOp, NotOp with per-op folds
- Add Involution trait to NotOp for not(not(x)) -> x folding
- Replace createUnaryOp() with createInc/Dec/Minus/Not builders
- Split LLVM lowering into four separate patterns
- Split LoweringPrepare complex-type handling per unary op
- Update CIRCanonicalize and CIRSimplify for new op types
- Update all codegen files to use bool params instead of UnaryOpKind

    [6 lines not shown]
DeltaFile
+91-105clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+56-88clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+111-28clang/include/clang/CIR/Dialect/IR/CIROps.td
+62-62clang/test/CIR/CodeGenOpenACC/private-clause-pointer-array-recipes-CtorDtor.cpp
+41-41clang/test/CIR/CodeGenOpenACC/private-clause-pointer-array-recipes-NoOps.cpp
+36-36clang/test/CIR/CodeGenOpenACC/combined-reduction-clause-outline-ops.cpp
+397-36078 files not shown
+1,393-1,36784 files

LLVM/project 290bce2clang/lib/CIR/CodeGen CIRGenExprComplex.cpp CIRGenExprScalar.cpp, clang/lib/CodeGen CGExprComplex.cpp

[CIR] Remove cir.unary(plus, ...) and emit nothing for unary plus

Traditional codegen never emits any operation for unary plus — it just
visits the subexpression as a pure identity at the codegen level. Align
CIRGen with this behavior by removing Plus from UnaryOpKind entirely
and having VisitUnaryPlus directly visit the subexpression with the
appropriate promotion/demotion handling.
DeltaFile
+68-67clang/lib/CodeGen/CGExprComplex.cpp
+0-72clang/test/CIR/Transforms/canonicalize.cir
+16-20clang/test/CIR/IR/unary.cir
+10-26clang/test/CIR/CodeGen/complex-unary.cpp
+18-16clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp
+14-12clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+126-21310 files not shown
+146-28316 files

LLVM/project 57b0061clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/Transforms CIRCanonicalize.cpp

[CIR] Add Commutative/Idempotent traits to binary ops

Add missing MLIR traits to CIR binary operations, matching the arith
dialect conventions:

- AndOp, OrOp: Commutative, Idempotent (fixes FIXME)
- AddOp, MulOp, XorOp, MaxOp: Commutative

Add these ops to the CIRCanonicalize pass op list so trait-based
folding is exercised by applyOpPatternsGreedily.

Update testFloatingPointBinOps in binop.cpp to use computed values,
preventing DCE of the now-canonicalized ops.
DeltaFile
+49-0clang/test/CIR/Transforms/binop-traits.cir
+28-18clang/test/CIR/CodeGen/binop.cpp
+10-6clang/include/clang/CIR/Dialect/IR/CIROps.td
+6-5clang/lib/CIR/Dialect/Transforms/CIRCanonicalize.cpp
+2-7clang/test/CIR/CodeGen/new.cpp
+2-2clang/test/CIR/CodeGen/size-of-vla.cpp
+97-382 files not shown
+100-438 files

LLVM/project 2852c22libc Maintainers.rst

[libc] Add myself as maintainer for Math, Threading and Runtime Safety
DeltaFile
+12-0libc/Maintainers.rst
+12-01 files

LLVM/project e865931llvm/lib/Transforms/Scalar StructurizeCFG.cpp, llvm/test/CodeGen/AMDGPU memintrinsic-unroll.ll

[StructurizeCFG] Fix incorrect zero-cost hoisting in nested control flow (#183792)

hoistZeroCostElseBlockPhiValues() hoists zero-cost instructions from
else blocks to their common dominator with the then block. When the
merge point has additional predecessors beyond the simple if-else
pattern, the hoisted instruction ends up in a dominator that feeds
a Flow phi on every edge, including edges where the else block was
never taken. simplifyHoistedPhis() then replaces poison entries in
those Flow phis with the hoisted value, causing it to leak into
unrelated paths.

This manifests as miscompilation in sorting kernels compiled with
code coverage: the PGO counter blocks create deeply nested CFGs
where the hoisted shufflevector (used for swapping sort keys)
reaches the no-swap path, corrupting sort results.

Fix by requiring a simple if-else CFG shape before hoisting: ThenBB
must branch directly to ElseSucc and ElseSucc must have exactly 2
predecessors. This matches the structure that simplifyHoistedPhis
assumes.
DeltaFile
+151-0llvm/test/Transforms/StructurizeCFG/hoist-zerocost-nested.ll
+7-0llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
+3-3llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+161-33 files

LLVM/project 1b85c63llvm/lib/Target/X86 X86ISelDAGToDAG.cpp, llvm/test/CodeGen/X86 mul-lohi-no-implicit-copy.ll

[X86] apply mulx optimization for two-wide mul instruction (mull, mulq) (#185127)

References: https://github.com/llvm/llvm-project/pull/184462

In the discussion for the linked PR, which removes unnecessary register
to register moves when one operand is in %rdx for mulx, the point was
brought up that this pattern also happens for mull and mulq.

The IR below:

```llvm
declare i32 @foo32()
declare i64 @foo64()

define i32 @mul32_no_implicit_copy(i32 %a0) {
  %a1 = call i32 @foo32()
  %a2 = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %a0, i32 %a1)
  %a3 = extractvalue { i32, i1 } %a2, 0
  ret i32 %a3

    [53 lines not shown]
DeltaFile
+24-17llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+39-0llvm/test/CodeGen/X86/mul-lohi-no-implicit-copy.ll
+63-172 files

LLVM/project ceb9176clang/lib/CIR/CodeGen CIRGenExprComplex.cpp CIRGenExprScalar.cpp, clang/lib/CodeGen CGExprComplex.cpp

[CIR] Remove cir.unary(plus, ...) and emit nothing for unary plus

Traditional codegen never emits any operation for unary plus — it just
visits the subexpression as a pure identity at the codegen level. Align
CIRGen with this behavior by removing Plus from UnaryOpKind entirely
and having VisitUnaryPlus directly visit the subexpression with the
appropriate promotion/demotion handling.
DeltaFile
+68-67clang/lib/CodeGen/CGExprComplex.cpp
+0-72clang/test/CIR/Transforms/canonicalize.cir
+10-26clang/test/CIR/CodeGen/complex-unary.cpp
+16-20clang/test/CIR/IR/unary.cir
+18-16clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp
+14-12clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+126-21310 files not shown
+146-28316 files