LLVM/project 92f8ff1llvm/test/MC/M68k MOVE.s generate_tests.py, llvm/test/MC/M68k/Data/Classes MxMove_RM.s MxMove_MM.s

[M68k][MC] Generate some encoding tests for MOVE (#194269)

# Problem statement

Instruction encoding needs to be solid, as it's one of the foundations
that a target backend is built upon.

It's error-prone work, and tedious to write tests for.

Test coverage for M68k instruction encoding isn't exhaustive, and we've
had bugs in the past where instructions have not been encoded correctly.

# Proposed solution

Using the documentation at https://m680x0.github.io/doc/official-docs it
should be possible to write some scripts to generate encoding tests for
all the instructions.

# Description of this PR

    [24 lines not shown]
DeltaFile
+2,020-0llvm/test/MC/M68k/MOVE.s
+392-0llvm/test/MC/M68k/generate_tests.py
+0-30llvm/test/MC/M68k/Data/Classes/MxMove_RM.s
+0-30llvm/test/MC/M68k/Data/Classes/MxMove_MM.s
+0-20llvm/test/MC/M68k/Data/Classes/MxMove_RR.s
+0-10llvm/test/MC/M68k/Data/Classes/MxMove_MR.s
+2,412-906 files

LLVM/project f3a6975clang/include/clang/StaticAnalyzer/Checkers Checkers.td, clang/lib/StaticAnalyzer/Checkers UseAfterLifetimeEnd.cpp CMakeLists.txt

[analyzer] Implement UseAfterLifetimeEnd checker (#205521)

Implemented the UseAfterLifetimEnd checker which is responsible for detecting lifetime safety violations involving the [[clang::lifetimebound]] annotation. This checker can catch violations in annotated code such as dangling pointer/reference bound to local variables that go out of scope. This checker is one of the reporting checkers that depend on the LifetimeModeling checker #205951. To detect dangling sources the checker queries the state at function exit points through the checkEndFunction callback. This checker does not handle lifetime issues where the code is unannotated.

Detailed work history of this checker can be found here: #200145

Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
DeltaFile
+258-0clang/lib/StaticAnalyzer/Checkers/UseAfterLifetimeEnd.cpp
+219-0clang/test/Analysis/lifetime-bound.cpp
+11-0clang/test/Analysis/debug-lifetime-bound.cpp
+11-0clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
+2-0clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
+501-05 files

LLVM/project 7207745clang/test/Driver stdc-predef.c

fixup! Adjust after MaskRay's comments
DeltaFile
+17-34clang/test/Driver/stdc-predef.c
+17-341 files

LLVM/project d78ec7cclang/docs ReleaseNotes.rst, clang/lib/Driver/ToolChains Linux.cpp

fixup! Address PR comments
DeltaFile
+44-62clang/test/Driver/stdc-predef.c
+11-4clang/lib/Driver/ToolChains/Linux.cpp
+2-1clang/docs/ReleaseNotes.rst
+57-673 files

LLVM/project 726237fclang/docs ReleaseNotes.rst, clang/lib/Driver/ToolChains Linux.cpp

[clang][Driver] Include stdc-predef.h by default on musl

Match GCC behavior for musl-based Linux targets by implicitly passing
`-include stdc-predef.h` for non-freestanding compilations.

Unlike glibc, musl does not arrange for this header to be included through
its normal system headers. As a result, Clang may miss predefined C macros
provided by musl's stdc-predef.h unless users include it manually, while the
same code works with GCC.

Add Driver tests covering musl, non-musl, freestanding, preprocessed input,
missing-header diagnostics, and actual macro visibility.

This patch is based on: https://reviews.llvm.org/D137043 and
slightly tweaks it, as the code has drifted since 2023 when
that was authored.

Co-authored-by: Tao Liang <Origami404 at foxmail.com>
Co-authored-by: YingChi Long <me at inclyc.cn>
DeltaFile
+95-0clang/test/Driver/stdc-predef.c
+9-0clang/lib/Driver/ToolChains/Linux.cpp
+4-0clang/test/Driver/Inputs/stdc-predef/usr/include/stdc-predef.h
+3-0clang/docs/ReleaseNotes.rst
+1-0clang/test/Driver/Inputs/stdc-predef/preprocessed.i
+112-05 files

LLVM/project 3a7d64allvm/lib/Target/DirectX DXILRootSignature.cpp

[DirectX] Fix build after #206330 (#206376)
DeltaFile
+2-3llvm/lib/Target/DirectX/DXILRootSignature.cpp
+2-31 files

LLVM/project 3a1eaf1llvm/test/CodeGen/Generic/MIRDebugify check-line-and-variables.mir

[MIR] Fix check-line-and-variables.mir test for external shell (#206364)
DeltaFile
+1-1llvm/test/CodeGen/Generic/MIRDebugify/check-line-and-variables.mir
+1-11 files

LLVM/project 8cdf634clang/test/CXX/drs cwg31xx.cpp, clang/www cxx_dr_status.html

[clang] Add test for CWG3129 (#206335)

Adds a test for [CWG3129](https://wg21.link/CWG3129) "Clarify which floating-point-literals are valid".

Clang has supported floating-point literals with overly tiny or huge
exponents since 3.0, with only a warning emitted.
DeltaFile
+19-2clang/test/CXX/drs/cwg31xx.cpp
+1-1clang/www/cxx_dr_status.html
+20-32 files

LLVM/project 7abad0fllvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/AArch64 transform-narrow-interleave-to-widen-memory-constant-ops.ll

[VPlan] Support different loop-invariant ops in narrowIG. (#203785)

Generalize the distinct per-field operand narrowing in
narrowInterleaveGroups from plain live-ins to any value defined outside
the vector loop region.

Depends on https://github.com/llvm/llvm-project/pull/203778.

PR: https://github.com/llvm/llvm-project/pull/203785
DeltaFile
+8-20llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-constant-ops.ll
+12-9llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+20-292 files

LLVM/project ffe61faclang/include/clang/AST OpenMPClause.h, clang/lib/AST OpenMPClause.cpp

[OpenMP][Clang] Fix parsing of num_teams lower-bound modifier (#205700)

PR #180608 added parsing for the `lower-bound` modifier in the
`num_teams` clause. However, the lower bound expression is handled by
adding it to the first position of the clause's varlist, which is the
list that holds the number of teams for each dimension when `ompx_bare`
is specified. Given that the interpretation of the varlist depends on
its length, the following `ompx_bare` cases are broken:
- `#pragma omp target teams ompx_bare num_teams(11,10)` is interpreted
as a lower-bound and upper-bound, triggering the error "_lower bound is
greater than upper bound in 'num_teams' clause_".
- `#pragma omp target teams ompx_bare num_teams(1,2)` is interpreted as
`num_teams(1:2)` when printing the AST.

This commit fixes the collision by storing the lower bound separated from
the list of upper-bounds. This change is necessary for landing the
upcoming support for multidimensional team spaces (OpenMP 6.1) through
the `dims` modifier.
DeltaFile
+55-35clang/lib/Sema/SemaOpenMP.cpp
+12-44clang/lib/Parse/ParseOpenMP.cpp
+41-2clang/include/clang/AST/OpenMPClause.h
+28-12clang/test/OpenMP/teams_num_teams_messages.cpp
+15-15clang/lib/AST/OpenMPClause.cpp
+16-7clang/lib/Sema/TreeTransform.h
+167-11513 files not shown
+233-13219 files

LLVM/project 20b5993.github CODEOWNERS

[Github] Add zeyi2 to clang-tidy codeowners (#206368)
DeltaFile
+3-3.github/CODEOWNERS
+3-31 files

LLVM/project 52ffd20llvm/lib/Transforms/Vectorize VPlanUtils.cpp VPlanPatternMatch.h, llvm/test/Transforms/LoopVectorize hoist-predicated-loads-with-predicated-stores.ll

[VPlan] Support SRem in getSCEVExprForVPValue. (#206361)

Extend vputils::getSCEVExprForVPValue to construct SCEV expressions for
SRem recipes. A SRem of non-negative operands is equivalent to URem.

Enables SCEV-based no-alias reasoning for stores derived from SRem GEPs.
DeltaFile
+76-23llvm/test/Transforms/LoopVectorize/hoist-predicated-loads-with-predicated-stores.ll
+8-0llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+6-0llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
+90-233 files

LLVM/project 6d1fbb5.github CODEOWNERS

[Github] Add myself to clang-tidy codeowners (#206365)
DeltaFile
+5-0.github/CODEOWNERS
+5-01 files

LLVM/project bdfb524llvm/utils/lit/lit TestRunner.py

python format

Created using spr 1.3.8-wip
DeltaFile
+2-2llvm/utils/lit/lit/TestRunner.py
+2-21 files

LLVM/project 94e7102llvm/utils/lit/lit TestRunner.py

debug only, should fix libcxx

Created using spr 1.3.8-wip
DeltaFile
+14-17llvm/utils/lit/lit/TestRunner.py
+14-171 files

LLVM/project e74cc18llvm/test/tools/llubi noalias_scope.ll, llvm/tools/llubi/lib Interpreter.cpp

[llubi] Treat `llvm.experimental.noalias.scope.decl` as a noop (#206357)

The noalias support is still work in progress:
https://github.com/llvm/llvm-project/pull/195808
`llvm.experimental.noalias.scope.decl` is emitted by the inliner. We may
need more time to clarify the semantics.
This patch treats the intrinsic as a noop to avoid crashes (metadata
arguments are not supported before this patch).
DeltaFile
+16-0llvm/test/tools/llubi/noalias_scope.ll
+5-0llvm/tools/llubi/lib/Interpreter.cpp
+21-02 files

LLVM/project 679ed0bllvm/include/llvm/CodeGen MachineCheckDebugify.h, llvm/lib/CodeGen MachineCheckDebugify.cpp TargetPassConfig.cpp

[CodeGen] Port mir-check-debugify to new pass manager (#199280)
DeltaFile
+101-80llvm/lib/CodeGen/MachineCheckDebugify.cpp
+33-0llvm/include/llvm/CodeGen/MachineCheckDebugify.h
+3-0llvm/test/CodeGen/Generic/MIRDebugify/check-line-and-variables.mir
+2-0llvm/test/CodeGen/Generic/MIRDebugify/multifunction-module.mir
+2-0llvm/test/CodeGen/Generic/MIRDebugify/check-line-and-variables-x.mir
+1-1llvm/lib/CodeGen/TargetPassConfig.cpp
+142-816 files not shown
+147-8512 files

LLVM/project 27e3251llvm/lib/Transforms/InstCombine InstCombineCalls.cpp, llvm/test/Transforms/InstCombine minmax-of-minmax.ll intrinsics.ll

[InstCombine] Create new instructions instead of in-place operand replacement (#115988)

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

Currently it doesn't affect final codegen. But we may suffer from this
problem when we utilize these attributes for further optimization (e.g.,
https://github.com/llvm/llvm-project/pull/111284). This test case is
reduced from a csmith-generated C program. And I believe this problem
also exists in real-world programs.
DeltaFile
+60-50llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+28-0llvm/test/Transforms/InstCombine/minmax-of-minmax.ll
+8-8llvm/test/Transforms/InstCombine/intrinsics.ll
+7-7llvm/test/Transforms/InstCombine/cttz-abs.ll
+11-0llvm/test/Transforms/InstCombine/minmax-fold.ll
+10-0llvm/test/Transforms/InstCombine/abs-intrinsic.ll
+124-658 files not shown
+145-8414 files

LLVM/project 8eb0c59llvm/test/Transforms/LoopVectorize/VPlan expand-scev.ll, llvm/test/Transforms/LoopVectorize/VPlan/RISCV expand-scev.ll

[VPlan] Add printing tests for various SCEV expressions. (NFC) (#206351)

Add tests currently not yet expanded to VPInstruction.
DeltaFile
+146-0llvm/test/Transforms/LoopVectorize/VPlan/expand-scev.ll
+59-0llvm/test/Transforms/LoopVectorize/VPlan/RISCV/expand-scev.ll
+205-02 files

LLVM/project 7cd03d0llvm/utils/lit/lit TestRunner.py

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+15-12llvm/utils/lit/lit/TestRunner.py
+15-121 files

LLVM/project cef5569llvm/include/llvm/Support ScopedPrinter.h, llvm/unittests/Support ScopedPrinterTest.cpp

[Support] Remove the now-unused EnumEntry (#206330)
DeltaFile
+0-307llvm/unittests/Support/ScopedPrinterTest.cpp
+0-82llvm/include/llvm/Support/ScopedPrinter.h
+0-3892 files

LLVM/project 905cccbllvm/test/Transforms/SLPVectorizer/X86 poor-throughput-seeds.ll

[SLP][NFC]Add a test with the poor cost seed instructions, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/206352
DeltaFile
+106-0llvm/test/Transforms/SLPVectorizer/X86/poor-throughput-seeds.ll
+106-01 files

LLVM/project e3ef2d9llvm/include/llvm/ADT SmallPtrSet.h, llvm/lib/Support SmallPtrSet.cpp

[SmallPtrSet] Optimize Grow and inline FindBucketFor. NFC (#206304)

During rehashing every key is known absent, so skip the equal-key
comparison.
DenseMap got a similar optimization in #200595

FindBucketFor is then only used by insert_imp_big; inline its probe loop
there. The loop takes 7 inst instead of 9 in the clang-generated
assembly after removing the two `LLVM_LIKELY`.
DeltaFile
+22-24llvm/lib/Support/SmallPtrSet.cpp
+0-1llvm/include/llvm/ADT/SmallPtrSet.h
+22-252 files

LLVM/project 49de424clang/lib/Format CMakeLists.txt

[clang-format][NFC] Clean up clang/lib/Format/CMakeLists.txt (#206314)
DeltaFile
+3-6clang/lib/Format/CMakeLists.txt
+3-61 files

LLVM/project c03e4bdclang/lib/Format TokenAnnotator.cpp, clang/unittests/Format TokenAnnotatorTest.cpp FormatTest.cpp

[clang-format] Set Context.IsExpression for C++ ternary operators (#206300)

This reverts e99e343dfdb2b1b490789a7bcba6d646a4824f15 (#199112).

Fixes #199027
DeltaFile
+2-8clang/lib/Format/TokenAnnotator.cpp
+5-4clang/unittests/Format/TokenAnnotatorTest.cpp
+1-1clang/unittests/Format/FormatTest.cpp
+8-133 files

LLVM/project 2959bfallvm/test/Transforms/LoopVectorize hoist-predicated-loads-with-predicated-stores.ll

[LV] Add test with pointer based on SRem expression (NFC). (#206344)

Add a test with loads and stores with pointers based on a signed
remainder (srem) of a non-negative induction variable, mirroring the
existing urem test.
DeltaFile
+123-0llvm/test/Transforms/LoopVectorize/hoist-predicated-loads-with-predicated-stores.ll
+123-01 files

LLVM/project 07a8a5ellvm/test/Transforms/SLPVectorizer/X86 odd_store.ll

[SLP][NFC] Avoid undef usage in odd_store.ll (#206333)

Replace `ret i32 undef` with void return type to avoid CI undef
deprecator failures.

For this PR: https://github.com/llvm/llvm-project/pull/206259
DeltaFile
+3-3llvm/test/Transforms/SLPVectorizer/X86/odd_store.ll
+3-31 files

LLVM/project 0094e38llvm/test/Transforms/LoopIdiom memset-multiple-accesses.ll

[LoopIdiom] Add tests with loops writing to fields at different offsets. (#206343)

Add loops with writes at multiple offsets and runtime trip counts.
DeltaFile
+404-0llvm/test/Transforms/LoopIdiom/memset-multiple-accesses.ll
+404-01 files

LLVM/project 5f3462dclang/include/clang/Basic Builtins.td, clang/lib/CodeGen CGAtomic.cpp

[clang] builtins for atomicrmw fminmax/_num (#187139)

Adds compiler builtins for `atomicrmw`: `fminimum`, `fmaximum`,
`fminimum_num`, `fmaximum_num`.
These will be used by the corresponding libc++ atomic apis (see #186716).
DeltaFile
+50-1clang/test/Sema/atomic-ops.c
+48-0clang/include/clang/Basic/Builtins.td
+44-1clang/lib/CodeGen/CGAtomic.cpp
+32-0clang/test/Sema/scoped-atomic-ops.c
+21-4clang/lib/Sema/SemaChecking.cpp
+17-0clang/test/CodeGen/AArch64/atomic-ops-float-check-minmax.c
+212-62 files not shown
+223-68 files

LLVM/project 7a8d4a4libc/test/include CMakeLists.txt

[libc][math] Re-enable iscanonical_c_test

Exercise the iscanonical macro, including its _Float16 and float128
branches. Part of #114618.
DeltaFile
+19-19libc/test/include/CMakeLists.txt
+19-191 files