LLVM/project 358e9a5llvm/lib/Transforms/Utils LoopPeel.cpp, llvm/test lit.cfg.py

[LP] Assign weights when peeling last iteration. (#166858)

DeltaFile
+66-0llvm/test/Transforms/LoopUnroll/branch-weights-freq/peel-last-iteration.ll
+36-15llvm/test/Transforms/LoopUnroll/peel-last-iteration-expansion-cost.ll
+22-1llvm/lib/Transforms/Utils/LoopPeel.cpp
+1-2llvm/test/lit.cfg.py
+125-184 files

LLVM/project e8222f8llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp

DAG: Preserve poison in combineConcatVectorOfScalars
DeltaFile
+2-2llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+2-21 files

LLVM/project 3c300b4llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 vselect.ll

X86: Handle poison in buildFromShuffleMostly
DeltaFile
+3-3llvm/test/CodeGen/X86/vselect.ll
+2-2llvm/lib/Target/X86/X86ISelLowering.cpp
+5-52 files

LLVM/project 350fb51llvm/lib/Target/AArch64 AArch64ISelLowering.cpp

AArch64: Use isUndef instead of checking opcode is UNDEF

This is to avoid regressions by poison introduction
DeltaFile
+4-6llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+4-61 files

LLVM/project 4ff4cc1llvm/lib/Transforms/IPO LowerTypeTests.cpp, llvm/test/Other new-pm-O0-defaults.ll

[LTT][profcheck] Set branch weights for complex llvm.type.test lowering
DeltaFile
+38-11llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+21-2llvm/test/Transforms/LowerTypeTests/section.ll
+1-0llvm/test/Other/new-pm-O0-defaults.ll
+60-133 files

LLVM/project bb75b3dllvm/lib/Transforms/Utils LoopPeel.cpp, llvm/test lit.cfg.py

[LP] Assign weights when peeling last iteration.
DeltaFile
+66-0llvm/test/Transforms/LoopUnroll/branch-weights-freq/peel-last-iteration.ll
+36-15llvm/test/Transforms/LoopUnroll/peel-last-iteration-expansion-cost.ll
+22-1llvm/lib/Transforms/Utils/LoopPeel.cpp
+1-2llvm/test/lit.cfg.py
+125-184 files

LLVM/project aca5e76llvm/lib/Transforms/IPO LowerTypeTests.cpp, llvm/test/Transforms/LowerTypeTests function-weak.ll

[LTT] Mark as unkown weak function tests.
DeltaFile
+3-2llvm/test/Transforms/LowerTypeTests/function-weak.ll
+3-0llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+6-22 files

LLVM/project a4e7d15mlir/test/python/dialects nvvm.py

[MLIR][Python] Add tests for nvvm barrier ops (#167976)

Found this issue #167958 when adding these tests, thanks for the quick
fix @clementval.
DeltaFile
+132-0mlir/test/python/dialects/nvvm.py
+132-01 files

LLVM/project 70349c1llvm/lib/CodeGen/SelectionDAG LegalizeVectorTypes.cpp

DAG: Use poison in SplitVecRes_VP_LOAD_FF (#167753)

DeltaFile
+1-1llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+1-11 files

LLVM/project 33a7bb1llvm/include/llvm/CodeGen ISDOpcodes.h, llvm/lib/CodeGen/SelectionDAG LegalizeVectorTypes.cpp

DAG: Use poison when legalizing scalar_to_vector results (#167751)

DeltaFile
+2-2llvm/include/llvm/CodeGen/ISDOpcodes.h
+1-1llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+3-32 files

LLVM/project 67f61dfllvm/lib/Transforms/Vectorize VPlan.h, llvm/unittests/Transforms/Vectorize VPlanTest.cpp VPlanTestBase.h

[VPlan] Always set trip count when creating plan for unit tests (NFC).

Simplifies some tests which no do not need to pass TC, and future
changes will require to always have a trip count available.
DeltaFile
+23-31llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
+6-3llvm/unittests/Transforms/Vectorize/VPlanTestBase.h
+1-2llvm/lib/Transforms/Vectorize/VPlan.h
+30-363 files

LLVM/project 63e059dllvm/docs NVPTXUsage.rst InstrProfileFormat.rst

[llvm] Proofread *.rst (#168185)

This patch is limited to single-word replacements to fix spelling
and/or grammar to ease the review process.  Punctuation and markdown
fixes are specifically excluded.
DeltaFile
+5-5llvm/docs/NVPTXUsage.rst
+4-4llvm/docs/InstrProfileFormat.rst
+3-3llvm/docs/Lexicon.rst
+3-3llvm/docs/MLGO.rst
+2-2llvm/docs/HowToBuildWindowsItaniumPrograms.rst
+2-2llvm/docs/LangRef.rst
+19-1910 files not shown
+31-3116 files

LLVM/project 268ea1allvm/lib/Analysis VectorUtils.cpp

[Analysis] Remove a redundant cast (NFC) (#168184)

NumElts is alreadyof type int.

Identified with readability-redundant-casting.
DeltaFile
+1-1llvm/lib/Analysis/VectorUtils.cpp
+1-11 files

LLVM/project 3a7876dllvm/include/llvm/ADT ConcurrentHashtable.h, llvm/lib/Target/Hexagon HexagonHazardRecognizer.h

[llvm] Delete pointers without null checks (NFC) (#168183)

Identified with readability-delete-null-pointer.
DeltaFile
+2-4llvm/include/llvm/ADT/ConcurrentHashtable.h
+1-4llvm/lib/Target/Hexagon/HexagonHazardRecognizer.h
+1-2llvm/lib/Transforms/Vectorize/VPlan.cpp
+4-103 files

LLVM/project 7a8237bllvm/lib/ObjCopy/ELF ELFObject.cpp ELFObjcopy.cpp, llvm/lib/Target/Hexagon HexagonISelDAGToDAGHVX.cpp

[llvm] Use llvm::copy (NFC) (#168182)

Identified with llvm-use-ranges.
DeltaFile
+4-4llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp
+3-3llvm/tools/lli/lli.cpp
+2-2llvm/lib/ObjCopy/ELF/ELFObject.cpp
+2-2llvm/unittests/Support/Path.cpp
+1-2llvm/tools/llvm-readobj/COFFDumper.cpp
+1-2llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
+13-159 files not shown
+22-2615 files

LLVM/project 636e370llvm/unittests/Transforms/Utils LocalTest.cpp

[Utils] Remove an unused local variable (NFC) (#168181)

Identified with bugprone-unused-local-non-trivial-variable.
DeltaFile
+0-1llvm/unittests/Transforms/Utils/LocalTest.cpp
+0-11 files

LLVM/project 59d2e93llvm/test/Transforms/LoopVectorize fcmp-uno-fold-interleave.ll

[LV] Add test with to check different interleave counts for fmaxnum.

This adds additional test coverage for folding FCMP uno
(https://github.com/llvm/llvm-project/pull/166823)
DeltaFile
+211-0llvm/test/Transforms/LoopVectorize/fcmp-uno-fold-interleave.ll
+211-01 files

LLVM/project d99c840llvm/test/tools/llvm-pdbutil dbi-section-headers.test, llvm/tools/llvm-pdbutil PdbYaml.cpp llvm-pdbutil.cpp

[llvm-pdbutil] Create DBI section headers in yaml2pdb (#166566)

The section headers present in the DBI stream got lost when using
`pdb2yaml` and `yaml2pdb`.

They are a list of COFF section headers. The
`llvm::object::coff_section` didn't have a YAML mapping, so I added one
in llvm-pdbutil. The mapping for COFF sections in ObjectYAML includes
the section data itself, so we can't use it here.

Creation of the section map and headers in yaml2pdb is done like in LLD:
https://github.com/llvm/llvm-project/blob/438a18c1e105ca04e624239644195e48b28b5099/lld/COFF/PDB.cpp#L1695-L1703
DeltaFile
+131-0llvm/test/tools/llvm-pdbutil/dbi-section-headers.test
+45-0llvm/tools/llvm-pdbutil/PdbYaml.cpp
+22-0llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
+21-0llvm/tools/llvm-pdbutil/PdbYaml.h
+18-0llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp
+1-0llvm/tools/llvm-pdbutil/llvm-pdbutil.h
+238-06 files

LLVM/project 9fa15efllvm/lib/Target/AMDGPU SIFoldOperands.cpp SIInstrInfo.cpp, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll

[AMDGPU] When shrinking and/or to bitset*, remove implicit scc def (#168128)

When shrinking and/or to bitset* remove leftover implicit scc def.
bitset* instructions do not set scc.

Signed-off-by: John Lu <John.Lu at amd.com>
DeltaFile
+80-80llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+39-39llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+11-22llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
+15-0llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+2-2llvm/test/CodeGen/AMDGPU/shrink-insts-scalar-bit-ops.mir
+3-0llvm/lib/Target/AMDGPU/SIInstrInfo.h
+150-1431 files not shown
+151-1447 files

LLVM/project 8f6c7aaclang/lib/Headers cpuid.h, clang/test/CodeGen attr-target-x86.c

[X86] Remove vector length (256 vs 512) distinction of AVX10 (#167736)

As in title. AVX10.x doesn't distinguish between available vector
lengths.

-mattr=avx10.x-512 and defining of macros with _512 is kept for compatibility. 

Bit-positions of avx10.1/2 features in compiler-rt and X86TargetParser
are synced to match those in the gcc.
DeltaFile
+97-0llvm/test/CodeGen/X86/llc-accept-avx10-512.ll
+6-15compiler-rt/lib/builtins/cpu_model/x86.c
+3-3llvm/include/llvm/TargetParser/X86TargetParser.def
+0-4clang/lib/Headers/cpuid.h
+2-2clang/test/CodeGen/attr-target-x86.c
+2-2llvm/lib/TargetParser/X86TargetParser.cpp
+110-266 files

LLVM/project 20db716llvm/lib/Analysis ValueTracking.cpp

[ValueTracking] Only check up to CtxIter in willNotFreeBetween.

Only check up to CtxI (CtxIter) when checking for calls that may free
in CtxI's block.

Missed update in https://github.com/llvm/llvm-project/pull/167965.

This should be NFC, as all current callers pass a terminator that is
guaranteed to not free as CtxI
DeltaFile
+1-1llvm/lib/Analysis/ValueTracking.cpp
+1-11 files

LLVM/project ea66d26clang/lib/Driver Driver.cpp, clang/lib/Driver/ToolChains Clang.cpp

HIP non-RDC: enable new offload driver on Windows via linker wrapper (#167918)

Use clang linker wrapper to device-link and embed HIP fat binary
directly. Match CUDA non-RDC flow in new driver by producing .hipfb like
.fatbin.

Previously, llvm offload binary is used to package the device IR's and
embed them in the host object file, then clang linker wrapper is used
with each host object file to extract device IR's, perform device
linking, bundle code objects into a fat binary, wrap it in a host object
file, then merge it with the original host object by the host linker
with '-r' option. However, the host linker in MSVC toolchain does not
support '-r' option.

The new approach still package the device IR's with llvm offload binary,
but instead of embed it in a host object, it is passed to clang linker
wrapper directly, where device IR's are extracted and linked, fat binary
is generated, then embeded in the host object directly. Compared with
the old offload driver, this approach can parallelize the device linking

    [3 lines not shown]
DeltaFile
+23-25clang/test/Driver/hip-phases.hip
+39-9clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+26-20clang/lib/Driver/Driver.cpp
+40-0clang/test/Driver/linker-wrapper-hip-no-rdc.c
+14-14clang/test/Driver/hip-toolchain-no-rdc.hip
+8-8clang/lib/Driver/ToolChains/Clang.cpp
+150-764 files not shown
+160-8210 files

LLVM/project 820daa5llvm/lib/Transforms/Vectorize VPlanUtils.cpp

[VPlan] Support VPWidenIntOrFpInduction in getSCEVExprForVPValue. (NFCI)

Construct SCEVs for VPWidenIntOrFpInductionRecipe analogous to
VPCanonicalInductionPHIRecipe: create an AddRec with start + step from
the recipe.

Currently the only impact should be computing more costs of replicating
stores directly in VPlan.
DeltaFile
+9-0llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+9-01 files

LLVM/project 5613e4amlir/test/Conversion/MemRefToEmitC memref-to-emitc-alloc-copy.mlir memref-to-emitc-copy.mlir

[mlir][emitc] Fix ineffective tests (#168197)

These tests were only checking the specialized prefix, leaving common
code unchecked (and incorrect). Checked code was also not using patterns
for SSA values.
DeltaFile
+39-35mlir/test/Conversion/MemRefToEmitC/memref-to-emitc-alloc-copy.mlir
+19-18mlir/test/Conversion/MemRefToEmitC/memref-to-emitc-copy.mlir
+58-532 files

LLVM/project 76c69callvm/include/llvm/Analysis ValueTracking.h, llvm/lib/Analysis ValueTracking.cpp

[ValueTracking] Bail out on non-immediate constant expressions (#168084)

In https://github.com/llvm/llvm-project/pull/165748 constant expressions
were allowed in `collectPossibleValues` because we are still using
insertelement + shufflevector idioms to represent a scalable vector
splat. However, it also accepts some unresolved constants like ptrtoint
of globals or pointer difference between two globals. Absolutely we can
ask the user to check this case with the constant folding API. However,
since we don't observe the real-world usefulness of handling constant
expressions, I decide to be more conservative and only handle immediate
constants in the helper function. With this patch, we don't need to
touch the SimplifyCFG part, as the values can only be either ConstantInt
or undef/poison values (NB: switch on undef condition is UB).

Fix the miscompilation reported by
https://github.com/llvm/llvm-project/pull/165748#issuecomment-3532245218
DeltaFile
+30-0llvm/test/Transforms/SimplifyCFG/switch-on-const.ll
+2-2llvm/include/llvm/Analysis/ValueTracking.h
+2-1llvm/lib/Analysis/ValueTracking.cpp
+34-33 files

LLVM/project 4cd8c11clang/lib/Headers avx512fintrin.h avx512fp16intrin.h, clang/test/CodeGen/X86 avx512fp16-builtins-constrained.c

[X86] Replace default _mm512_sqrt_pd/s/h implementations with generic __builtin_elementwise_sqrt (#168057)

Followup to #165682
DeltaFile
+14-28clang/lib/Headers/avx512fintrin.h
+5-9clang/lib/Headers/avx512fp16intrin.h
+4-4clang/test/CodeGen/X86/avx512fp16-builtins-constrained.c
+23-413 files

LLVM/project eb98b65llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/LoopVectorize single-early-exit-deref-assumptions.ll

[ValueTracking] Check across single predecessors in willNotFreeBetween. (#167965)

Extend willNotFreeBetween to perform simple checking across blocks to
support the case where CtxI is in a successor of the block that contains
the assume, but the assume's parent is the single predecessor of CtxI's
block.

This enables using _builtin_assume_dereferenceable to vectorize
std::find_if and co in practice.

End-to-end reproducer: https://godbolt.org/z/6jbsd4EjT

PR: https://github.com/llvm/llvm-project/pull/167965
DeltaFile
+275-4llvm/test/Transforms/LoopVectorize/single-early-exit-deref-assumptions.ll
+31-12llvm/lib/Analysis/ValueTracking.cpp
+306-162 files

LLVM/project ca26cf8llvm/test/Transforms/LoopVectorize/AArch64 vplan-printing.ll

[LV] Use variables in CHECK lines for unnamed VPValues in test.

Update test to capture unnamed VPValues in variables, making it easier
to update with future VPlan changes.
DeltaFile
+26-26llvm/test/Transforms/LoopVectorize/AArch64/vplan-printing.ll
+26-261 files

LLVM/project 5593f45clang/include/clang/StaticAnalyzer/Core/PathSensitive SMTConv.h, clang/test/Analysis z3-unarysymexpr.c

[analyzer] Fix crash in Z3 SMTConv when negating a boolean expression (#165779) (#168034)

Refer to #158276 for previous hotfix.

In Z3, boolean expressions are incompatible with bitvec operators.
However, C expressions like `-(5 && a)` will generate such symbolic
expressions, which will be further used as an integer. To be compatible
with such usages, this fix converts such expressions to integer using
the existing `fromCast`.
DeltaFile
+9-11clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h
+8-0clang/test/Analysis/z3-unarysymexpr.c
+17-112 files

LLVM/project 85db928llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

[VPlan] Strip outdated comment in optimizeForVFAndUF (NFC) (#168068)

DeltaFile
+0-3llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+0-31 files