LLVM/project 2c28158llvm/lib/IR Intrinsics.cpp, llvm/utils/TableGen/Basic IntrinsicEmitter.cpp

[LLVM][Intrinsics] Eliminate range check for IIT table in `DecodeIITType` (#190260)

`DecodeIITType` does a range check each time the next entry from the IIT
encoding table is read. This is required to handle IIT encodings that
are in-lined into the `IIT_Table` entries, since the `IITEntries` array
in `getIntrinsicInfoTableEntries` is terminated after the last non-zero
nibble is seen in the inlined encoding (but that may not be the actual
end). Change this code to instead have the `IITEntries` array for the
inlined case point to the full `IITValues` array payload + a IIT_Done
terminator, so that such entries look exactly like they would if they
were encoded in the long encoding table and then remove the range check
in `DecodeIITType` to streamline that code a bit.

Additionally, change some use if 0s (in loop conditions and default
constructed terminator in the IIT long encoding table) to explicitly use
IIT_Done to clarify the code better.

Also use `consume_front()` in a few places instead of `front()` followed
by `slice(1)`.
DeltaFile
+27-26llvm/lib/IR/Intrinsics.cpp
+7-1llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp
+34-272 files

LLVM/project e62acf4llvm/include/llvm-c Core.h, llvm/include/llvm/IR IRBuilder.h

[NFC][LLVM] Rename IRBuilder/LLVM C API params for overload types (#191674)

Rename IRBuilder and LLVM C API function params for overload types to
use names to better reflect their meaning.
DeltaFile
+20-17llvm/lib/IR/Core.cpp
+12-12llvm/include/llvm-c/Core.h
+5-4llvm/include/llvm/IR/IRBuilder.h
+2-2llvm/lib/IR/IRBuilder.cpp
+39-354 files

LLVM/project d946ac3llvm/lib/Transforms/Utils CallGraphUpdater.cpp, llvm/test/Transforms/Inline inline-history-dead-function.ll

[CallGraphUpdater] Replace dead function in metadata with null instead of poison (#191729)

Assisted-by: claude-4.6-opus
DeltaFile
+29-0llvm/test/Transforms/Inline/inline-history-dead-function.ll
+6-1llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
+35-12 files

LLVM/project 21d9778llvm/test/CodeGen/AMDGPU memory-legalizer-private-singlethread.ll memory-legalizer-private-wavefront.ll

Rebase

Created using spr 1.3.7
DeltaFile
+8,544-1,366llvm/test/CodeGen/AMDGPU/memory-legalizer-private-singlethread.ll
+8,544-1,366llvm/test/CodeGen/AMDGPU/memory-legalizer-private-wavefront.ll
+8,544-1,366llvm/test/CodeGen/AMDGPU/memory-legalizer-private-workgroup.ll
+8,449-1,355llvm/test/CodeGen/AMDGPU/memory-legalizer-private-agent.ll
+8,449-1,355llvm/test/CodeGen/AMDGPU/memory-legalizer-private-cluster.ll
+8,069-1,315llvm/test/CodeGen/AMDGPU/memory-legalizer-private-system.ll
+50,599-8,1237,128 files not shown
+569,814-214,9437,134 files

LLVM/project c0fbdb2clang/lib/AST/ByteCode EvaluationResult.cpp

[clang][bytecode] Stop using QualTypes when checking evaluation results (#191732)

They might not match the descriptor contents exactly, so just look at
the descriptors.
DeltaFile
+25-34clang/lib/AST/ByteCode/EvaluationResult.cpp
+25-341 files

LLVM/project c4c31f8llvm/lib/Transforms/Vectorize SLPVectorizer.cpp

Fix formatting

Created using spr 1.3.7
DeltaFile
+1-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+1-21 files

LLVM/project bef1453clang/lib/Headers/hlsl hlsl_alias_intrinsics.h, llvm/test/CodeGen/AArch64 itofp-bf16.ll

Rebase, address comments

Created using spr 1.3.7
DeltaFile
+0-4,851llvm/test/tools/llvm-mca/RISCV/SiFiveX390/vector-fp.s
+2,832-1,746llvm/test/CodeGen/AArch64/itofp-bf16.ll
+4,526-0llvm/test/tools/llvm-mca/RISCV/SiFiveX390/rvv/arithmetic.test
+3,583-866llvm/test/CodeGen/RISCV/fpclamptosat.ll
+4-3,871clang/lib/Headers/hlsl/hlsl_alias_intrinsics.h
+3,706-0llvm/test/tools/llvm-mca/RISCV/SiFiveX390/rvv/fp.test
+14,651-11,3343,790 files not shown
+188,733-91,1953,796 files

LLVM/project 717ba7cllvm/lib/Transforms/Vectorize VPlanRecipes.cpp VPlanConstruction.cpp

[VPlan] Handle calls in VPInstruction:opcodeMayReadOrWriteFromMemory. (#190681)

Retrieve the called function and check its memory attributes, to
determine if a VPInstruction calling a function reads or writes memory.

Use it to strengthen assert in areAllLoadsDereferenceable.

PR: https://github.com/llvm/llvm-project/pull/190681
DeltaFile
+25-8llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+4-2llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+29-102 files

LLVM/project a98cb95llvm/tools/llvm-profgen PerfReader.cpp PerfReader.h

reduce changes

Created using spr 1.3.4
DeltaFile
+10-10llvm/tools/llvm-profgen/PerfReader.cpp
+3-0llvm/tools/llvm-profgen/PerfReader.h
+13-102 files

LLVM/project 029e5b0clang/lib/Format WhitespaceManager.cpp ContinuationIndenter.h, clang/unittests/Format AlignmentTest.cpp

[clang-format] treat continuation as indent for aligned lines (#191217)

This allows to inherit tabbed indent from the lines we break by the
lines we want to align. Thus in the AlignWithSpaces mode aligned lines
do not generate smaller indent than those they are aligned to.
DeltaFile
+38-19clang/lib/Format/WhitespaceManager.cpp
+34-0clang/unittests/Format/AlignmentTest.cpp
+16-17clang/lib/Format/ContinuationIndenter.h
+15-14clang/lib/Format/ContinuationIndenter.cpp
+19-0clang/lib/Format/FormatToken.h
+8-7clang/lib/Format/BreakableToken.cpp
+130-572 files not shown
+136-628 files

LLVM/project 5b1b0efclang/tools/diagtool ShowEnabledWarnings.cpp

[Clang][diagtool] Fix memory leak in ShowEnabledWarnings (#191711)

Fix 136-byte memory leak introduced in commit 6dc059ac3c7c. Before
that commit, the TextDiagnosticBuffer was passed to DiagnosticsEngine
constructor which took ownership and managed its lifetime. After the
refactoring, the buffer is no longer passed to DiagnosticsEngine, so
it becomes an orphaned allocation that is never freed. Changed to use
std::unique_ptr for automatic cleanup.
DeltaFile
+2-1clang/tools/diagtool/ShowEnabledWarnings.cpp
+2-11 files

LLVM/project 56775ballvm/tools/llubi/lib Library.cpp

[llubi] Fix invalid printf format specifier for %c (#191713)

Fix ASAN warning about unexpected format specifier %llc introduced
in commit f149ab665a4b. The 'c' format specifier should not have the
'll' length modifier. Separated the 'c' case to use the correct format
without the length modifier, casting to int as required by the standard.
DeltaFile
+7-2llvm/tools/llubi/lib/Library.cpp
+7-21 files

LLVM/project b799b38llvm/include/llvm/CodeGen AsmPrinter.h, llvm/lib/CodeGen/AsmPrinter AsmPrinter.cpp

[AsmPrinter] Fix redundant/weaker .prefalign when IR align attr >= prefalign (#191675)

PR #155529 (only fired with -ffunction-sections, then modified by PR
184032) compared `MF->getAlignment()` (the backend's minimum function
alignment) against `MF->getPreferredAlignment()` to decide whether to
emit `.prefalign`. This ignored the IR function's own align attribute,
which `emitAlignment` picks up later via `getGVAlignment`, so the
comparison was against the wrong minimum.

Consequences on x86 (backend min = 1, target pref = 16):

* `[[gnu::aligned(32)]] void g(){}` lowers to `align 32 prefalign(32)`.

      .p2align 5
      .prefalign 5, .Lfunc_end, nop

  The .prefalign is fully redundant: .p2align 5 already forces the
  desired 32-byte alignment.


    [9 lines not shown]
DeltaFile
+18-14llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+15-0llvm/test/CodeGen/X86/prefalign.ll
+4-3llvm/include/llvm/CodeGen/AsmPrinter.h
+37-173 files

LLVM/project 6ea4377libcxx/test/std/numerics/numeric.ops/numeric.ops.sat saturate_cast.pass.cpp saturating_cast.pass.cpp, llvm/lib/Target/AMDGPU GCNSchedStrategy.cpp

Rebase

Created using spr 1.3.7
DeltaFile
+2,253-17llvm/test/CodeGen/AMDGPU/freeze.ll
+0-394libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturate_cast.pass.cpp
+394-0libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturating_cast.pass.cpp
+385-0llvm/test/CodeGen/X86/apx/pr191368.ll
+157-138llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+140-150llvm/test/CodeGen/AMDGPU/load-global-i16.ll
+3,329-699234 files not shown
+8,456-3,789240 files

LLVM/project 7c872e9llvm/test/Transforms/SLPVectorizer/X86 operand-reorder-with-copyables.ll

[SLP][NFC]Add a test with the reordering of the RHS/LHS operands for copyables, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/191730
DeltaFile
+140-0llvm/test/Transforms/SLPVectorizer/X86/operand-reorder-with-copyables.ll
+140-01 files

LLVM/project a7b4e7bllvm/lib/Transforms/Utils CallGraphUpdater.cpp, llvm/test/Transforms/Inline inline-history-dead-function.ll

[CallGraphUpdater] Replace dead function in metadata with null instead of poison

Assisted-by: claude-4.6-opus
DeltaFile
+29-0llvm/test/Transforms/Inline/inline-history-dead-function.ll
+6-1llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
+35-12 files

LLVM/project 47e77fallvm/include/llvm/Analysis ValueTracking.h, llvm/lib/Analysis ValueTracking.cpp BasicAliasAnalysis.cpp

ValueTracking: Use SimplifyQuery for computeKnownConstantRange

Does introduce new context passing in a few of the updated contexts.
DeltaFile
+23-28llvm/lib/Analysis/ValueTracking.cpp
+20-20llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+18-10llvm/unittests/Analysis/ValueTrackingTest.cpp
+4-3llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+4-3llvm/lib/Analysis/BasicAliasAnalysis.cpp
+1-4llvm/include/llvm/Analysis/ValueTracking.h
+70-684 files not shown
+79-7410 files

LLVM/project 0ab10d1llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/InstCombine known-range-frexp-exp.ll

ValueTracking: Handle frexp exp in computeKnownConstantRange (#191282)
DeltaFile
+136-0llvm/test/Transforms/InstCombine/known-range-frexp-exp.ll
+29-1llvm/lib/Analysis/ValueTracking.cpp
+165-12 files

LLVM/project 183660dllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 phi-operand-gathered-loads.ll

[SLP] Fix GEP cost computation for load vectorization cost estimates

Pass Instruction::Load instead of Instruction::GetElementPtr to
getGEPCosts in isMaskedLoadCompress and CheckForShuffledLoads.
These call sites estimate costs for wide contiguous loads and sub-vector
load patterns, not for masked gather pointer vector formation. Using
Instruction::GetElementPtr incorrectly triggered the gather-style cost
path, which computes vector GEP formation costs. Since the call sites
already add scalarization overhead for pointer vector building
separately, this led to double-counting of pointer costs and inaccurate
vectorization decisions.

Reviewers: hiraditya, RKSimon

Pull Request: https://github.com/llvm/llvm-project/pull/191728
DeltaFile
+16-6llvm/test/Transforms/SLPVectorizer/X86/phi-operand-gathered-loads.ll
+5-7llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+21-132 files

LLVM/project 6c77981llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3 KaleidoscopeJIT.h, llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4 KaleidoscopeJIT.h

[ORC] Move MemoryAccess ownership out of ExecutorProcessControl. (#191715)

Similar to the DylibManager change in e55fb5de0f9, this removes an
unnecessary coupling between ExecutorProcessControl and MemoryAccess,
allowing clients to select MemoryAccess implementations independently.

To simplify the transition, the
ExecutorProcessControl::createDefaultMemoryAccess method will return an
instance of whatever MemoryAccess the ExecutorProcessControl
implementation had been using previously.
DeltaFile
+21-31llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp
+15-13llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp
+11-11llvm/include/llvm/ExecutionEngine/Orc/EPCIndirectionUtils.h
+12-2llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h
+12-2llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
+4-9llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h
+75-6812 files not shown
+138-9818 files

LLVM/project 8113b98llvm/lib/Transforms/InstCombine InstCombineCompares.cpp, llvm/test/Transforms/InstCombine icmp-umax-notx.ll

[InstCombine] Missed fold: umax(x, C) > ~x -> x < 0 (#189396)

fix : https://github.com/llvm/llvm-project/issues/187648

Fix the missed optimization for 
`icmp ugt (umax(x, C)), ~x` and `icmp ult (umax(x, C)), ~x`

Alive2 proof:
https://alive2.llvm.org/ce/z/dDNJ2m
https://alive2.llvm.org/ce/z/X633UX
DeltaFile
+43-0llvm/test/Transforms/InstCombine/icmp-umax-notx.ll
+22-1llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+65-12 files

LLVM/project 25691e3llvm/include/llvm/Analysis ValueTracking.h, llvm/lib/Analysis ValueTracking.cpp BasicAliasAnalysis.cpp

ValueTracking: Use SimplifyQuery for computeKnownConstantRange

Does introduce new context passing in a few of the updated contexts.
DeltaFile
+23-28llvm/lib/Analysis/ValueTracking.cpp
+20-20llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+18-10llvm/unittests/Analysis/ValueTrackingTest.cpp
+5-3llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+4-2llvm/lib/Analysis/BasicAliasAnalysis.cpp
+1-4llvm/include/llvm/Analysis/ValueTracking.h
+71-674 files not shown
+81-7410 files

LLVM/project 90d3515llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 phi-operand-gathered-loads.ll

Revert "[SLP] Fix GEP cost computation for load vectorization cost estimates"

This reverts commit 778c0fb1dbf1803f8f250fd7feb935095e91e57b to fix
buildbots https://lab.llvm.org/buildbot/#/builders/213/builds/2725, https://lab.llvm.org/buildbot/#/builders/212/builds/2876

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/191725
DeltaFile
+6-16llvm/test/Transforms/SLPVectorizer/X86/phi-operand-gathered-loads.ll
+6-5llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+12-212 files

LLVM/project 45ac339llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/InstCombine known-range-frexp-exp.ll

ValueTracking: Handle frexp exp in computeKnownConstantRange

Compute the bounds based on the known exponent range.
Only handles IEEE cases since I don't see an easy way to
get the bounds in general.

Test uses instcombine instead of checking for the range
attribute, since apparently attributor doesn't handle introducing
range attributes from computeConstantRange.
DeltaFile
+136-0llvm/test/Transforms/InstCombine/known-range-frexp-exp.ll
+29-1llvm/lib/Analysis/ValueTracking.cpp
+165-12 files

LLVM/project 1d1208bllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 copyable-phi-used-non-copyable.ll

[SLP]Fix dominance failure when value is copyable in one PHI entry but non-copyable in another

When a value is treated as a copyable element in one tree entry and as a
non-copyable element in another, both feeding into PHI nodes, the
scheduler could produce vectorized IR where an instruction does not
dominate all its uses. Bail out of scheduling in tryScheduleBundle when
this conflict is detected to prevent generating broken modules.
Fixes #191714

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/191724
DeltaFile
+53-0llvm/test/Transforms/SLPVectorizer/X86/copyable-phi-used-non-copyable.ll
+12-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+65-02 files

LLVM/project e9cd683llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV/rvv fixed-vectors-shuffle-vslide1up-bf16.ll fixed-vectors-shuffle-vslide1down-bf16.ll

[RISCV] Enable vfslide1up/down for bf16 shuffles with Zvfbfa. (#191608)
DeltaFile
+49-0llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-vslide1up-bf16.ll
+45-0llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-vslide1down-bf16.ll
+4-30llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-vslide1up.ll
+4-28llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-vslide1down.ll
+2-1llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+104-595 files

LLVM/project 38e9650llvm/lib/Transforms/Utils CallGraphUpdater.cpp, llvm/test/Transforms/Inline inline-history-dead-function.ll

[CallGraphUpdater] Replace dead function in metadata with null instead of poison
DeltaFile
+29-0llvm/test/Transforms/Inline/inline-history-dead-function.ll
+6-1llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
+35-12 files

LLVM/project 636dbc8clang/lib/AST/ByteCode Interp.h Char.h

[clang][bytecode] Support different integral types (e.g. addresses) (#185028)

This is an alternative approach to
https://github.com/llvm/llvm-project/pull/169769.

We increase the size of the old `Integral<Bits, Signed>` to 24 bytes (on
a 64 bit system) and introduce a new `Char<Signed>` that's used for the
old `PT_Sint8` and `PT_Uint8` primitive types.

The old approach did not work out in the end because we need to be able
to do arithmetic (but essentially just `+` and `-`) on the offsets of
such integers-that-are-actually-pointers.

c-t-t-:

https://llvm-compile-time-tracker.com/compare.php?from=723d5cb11b2a64e4f11032f24967702e52f822bc&to=16dc90efebbf52e381c7655131b2fb74c307cc42&stat=instructions:u
DeltaFile
+246-17clang/lib/AST/ByteCode/Interp.h
+225-0clang/lib/AST/ByteCode/Char.h
+148-52clang/lib/AST/ByteCode/Integral.h
+27-34clang/lib/AST/ByteCode/InterpBuiltin.cpp
+45-0clang/lib/AST/ByteCode/Primitives.h
+23-11clang/lib/AST/ByteCode/Interp.cpp
+714-11434 files not shown
+905-14140 files

LLVM/project 0dec824flang/lib/Optimizer/Transforms MIFOpConversion.cpp

Fix typo in comment for multi-image environment
DeltaFile
+1-1flang/lib/Optimizer/Transforms/MIFOpConversion.cpp
+1-11 files

LLVM/project 5c5b8eaflang/lib/Semantics openmp-utils.cpp

format
DeltaFile
+2-1flang/lib/Semantics/openmp-utils.cpp
+2-11 files