LLVM/project dca074aclang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/CodeGenBuiltins builtin_bit.cpp

[CIR] Match codegen change on __builtin_clrsb expansion

- 0bc6491da0c827ce94bd8fa852422eaafe6c39e7 adds the `nuw` flag during
  __builtin_clrsb expansion. Match that change in CIR.
DeltaFile
+6-6clang/test/CIR/CodeGenBuiltins/builtin_bit.cpp
+2-1clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+8-72 files

LLVM/project 72022abllvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-shufflevector.ll

InstCombine: Rudimentary support of shufflevector in SimplifyDemandedFPClass (#174101)

This should look more like the computeKnownFPClass handling, with
knowledge of demanded vector elements.
DeltaFile
+269-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-shufflevector.ll
+11-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+280-02 files

LLVM/project d0d3d63mlir/include/mlir/Interfaces ControlFlowInterfaces.td ControlFlowInterfaces.h, mlir/lib/Dialect/SCF/IR SCF.cpp

[mlir][draft] Consolidate patterns into RegionBranchOpInterface patterns

fix some tests

reorganize code
DeltaFile
+17-813mlir/lib/Dialect/SCF/IR/SCF.cpp
+293-0mlir/lib/Interfaces/ControlFlowInterfaces.cpp
+11-13mlir/test/Dialect/SCF/canonicalize.mlir
+9-0mlir/include/mlir/Interfaces/ControlFlowInterfaces.td
+9-0mlir/include/mlir/Interfaces/ControlFlowInterfaces.h
+4-4mlir/test/Transforms/remove-dead-values.mlir
+343-8306 files

LLVM/project 777c729mlir/include/mlir/Transforms Passes.td Passes.h, mlir/lib/Transforms RemoveDeadValues.cpp

tmp commit

simple test working

draft: do not erase IR, just replace uses
DeltaFile
+179-332mlir/lib/Transforms/RemoveDeadValues.cpp
+110-45mlir/test/Transforms/remove-dead-values.mlir
+10-0mlir/include/mlir/Transforms/Passes.td
+1-0mlir/include/mlir/Transforms/Passes.h
+300-3774 files

LLVM/project c6ed9f7mlir/include/mlir/IR PatternMatch.h, mlir/lib/Dialect/SCF/IR SCF.cpp

[mlir][IR][NFC] Add `RewriterBase::eraseOpResults` convenience helper
DeltaFile
+55-131mlir/lib/Dialect/SCF/IR/SCF.cpp
+36-0mlir/lib/IR/PatternMatch.cpp
+3-28mlir/lib/Transforms/RemoveDeadValues.cpp
+6-0mlir/include/mlir/IR/PatternMatch.h
+100-1594 files

LLVM/project 5bfdb45flang/lib/Support Fortran-features.cpp, llvm/test/CodeGen/NVPTX tensormap_replace_sm_103a.ll

Merge branch 'main' into users/arsenm/instcombine/handle-shufflevector-simplifydemandedfpclass
DeltaFile
+1-1llvm/test/CodeGen/NVPTX/tensormap_replace_sm_103a.ll
+0-1flang/lib/Support/Fortran-features.cpp
+1-22 files

LLVM/project 410ec6dflang/lib/Support Fortran-features.cpp

[flang] Disable new -Wused-undefined-variable warning by default (#174151)

The new warning about local variables that are used without possible
being defined or initialized may be generating some false positives;
disable it by default for now.
DeltaFile
+0-1flang/lib/Support/Fortran-features.cpp
+0-11 files

LLVM/project 025d74dllvm/test/CodeGen/NVPTX tensormap_replace_sm_103a.ll

[NVPTX] Add proper precondition in tensormap_replace_sm_103a test (#174144)

Fixes 14b1d770db7f9ee49693063ad851215dede0766e.
DeltaFile
+1-1llvm/test/CodeGen/NVPTX/tensormap_replace_sm_103a.ll
+1-11 files

LLVM/project 1febc3fllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/PhaseOrdering/X86 pr48223.ll

Revert "[SLP] Support for copyables in the reduced values (#153589)"

This reverts commit 831bb12a30dbbbf69930c11846a7b62b33e0f0db to fix
buildbot https://lab.llvm.org/buildbot/#/builders/224/builds/1205
DeltaFile
+110-42llvm/test/Transforms/SLPVectorizer/X86/pr48879-sroa.ll
+126-23llvm/test/Transforms/PhaseOrdering/X86/pr48223.ll
+21-35llvm/test/Transforms/SLPVectorizer/operand-is-reduced-val.ll
+3-45llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+16-20llvm/test/Transforms/SLPVectorizer/X86/PR39774.ll
+9-19llvm/test/Transforms/SLPVectorizer/reduction-modified-values.ll
+285-18410 files not shown
+338-23916 files

LLVM/project 831bb12llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/PhaseOrdering/X86 pr48223.ll

[SLP] Support for copyables in the reduced values (#153589)

Currently reductions can handles only same/alternate instructions,
skipping potential support for copyables. Patch adds support for
copyables in the reduced values.
DeltaFile
+42-110llvm/test/Transforms/SLPVectorizer/X86/pr48879-sroa.ll
+23-126llvm/test/Transforms/PhaseOrdering/X86/pr48223.ll
+35-21llvm/test/Transforms/SLPVectorizer/operand-is-reduced-val.ll
+45-3llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+20-16llvm/test/Transforms/SLPVectorizer/X86/PR39774.ll
+19-9llvm/test/Transforms/SLPVectorizer/reduction-modified-values.ll
+184-28510 files not shown
+239-33816 files

LLVM/project 6ac8facmlir/include/mlir/Transforms Passes.td Passes.h, mlir/lib/Transforms RemoveDeadValues.cpp

tmp commit

simple test working

draft: do not erase IR, just replace uses
DeltaFile
+188-335mlir/lib/Transforms/RemoveDeadValues.cpp
+110-45mlir/test/Transforms/remove-dead-values.mlir
+10-0mlir/include/mlir/Transforms/Passes.td
+1-0mlir/include/mlir/Transforms/Passes.h
+309-3804 files

LLVM/project 2de1c9flibcxx/docs/Status Cxx2cIssues.csv, libcxx/include optional

Merge branch 'main' into users/arsenm/instcombine/handle-shufflevector-simplifydemandedfpclass
DeltaFile
+36-12libcxx/include/optional
+40-0libcxx/test/std/utilities/optional/optional.relops/relops.compile.pass.cpp
+1-1libcxx/docs/Status/Cxx2cIssues.csv
+1-0utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel
+78-134 files

LLVM/project c94ddeallvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-insertelement.ll

InstCombine: Basic insertelement support for SimplifyDemandedFPClass (#174100)

Eventually this should pull up the known elements logic from
computeKnownFPClass.
DeltaFile
+187-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-insertelement.ll
+10-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+197-02 files

LLVM/project 6561f39llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass.ll

InstCombine: Fix defining undef constant vector elts in SimplifyDemandedFPClass (#174074)

Fold constants of known single class to the original constant instead of
a new constant. This avoids overdefining vector elements that were
originally undefined with the splat constant.
DeltaFile
+29-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass.ll
+12-2llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+41-22 files

LLVM/project 765b64butils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy BUILD.bazel

[bazel] Port 92f16356340d230f04e67d9d7b8f3d91b9f0513b
DeltaFile
+1-0utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel
+1-01 files

LLVM/project 222dcb3mlir/include/mlir/Dialect/SparseTensor/IR SparseTensorOps.td, mlir/include/mlir/Interfaces ControlFlowInterfaces.h

reorganize code
DeltaFile
+11-275mlir/lib/Dialect/SCF/IR/SCF.cpp
+282-0mlir/lib/Interfaces/ControlFlowInterfaces.cpp
+17-17mlir/test/Dialect/SparseTensor/sparse_out.mlir
+8-8mlir/test/Dialect/SparseTensor/sparse_kernels.mlir
+7-0mlir/include/mlir/Interfaces/ControlFlowInterfaces.h
+3-4mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
+328-3041 files not shown
+331-3077 files

LLVM/project 75522acmlir/include/mlir/Interfaces ControlFlowInterfaces.h, mlir/lib/Dialect/SCF/IR SCF.cpp

reorganize code
DeltaFile
+11-275mlir/lib/Dialect/SCF/IR/SCF.cpp
+281-0mlir/lib/Interfaces/ControlFlowInterfaces.cpp
+17-17mlir/test/Dialect/SparseTensor/sparse_out.mlir
+8-8mlir/test/Dialect/SparseTensor/sparse_kernels.mlir
+7-0mlir/include/mlir/Interfaces/ControlFlowInterfaces.h
+3-3mlir/test/Dialect/Vector/vector-warp-distribute.mlir
+327-3036 files

LLVM/project 8b2bcb7mlir/include/mlir/Interfaces ControlFlowInterfaces.td, mlir/lib/Dialect/SCF/IR SCF.cpp

[mlir][draft] Consolidate patterns into RegionBranchOpInterface patterns

fix some tests
DeltaFile
+280-854mlir/lib/Dialect/SCF/IR/SCF.cpp
+39-0mlir/lib/Interfaces/ControlFlowInterfaces.cpp
+17-17mlir/test/Dialect/SparseTensor/sparse_out.mlir
+11-13mlir/test/Dialect/SCF/canonicalize.mlir
+8-8mlir/test/Dialect/SparseTensor/sparse_kernels.mlir
+9-0mlir/include/mlir/Interfaces/ControlFlowInterfaces.td
+364-8924 files not shown
+377-90210 files

LLVM/project 07adecflibcxx/docs/Status Cxx2cIssues.csv, libcxx/include optional

[libc++] Resolve LWG4370 (#174062)

Resolves #171364

- Implement [proposed resolution of LWG4370](https://wg21.link/LWG4370)
- Add corresponding compile test
DeltaFile
+36-12libcxx/include/optional
+40-0libcxx/test/std/utilities/optional/optional.relops/relops.compile.pass.cpp
+1-1libcxx/docs/Status/Cxx2cIssues.csv
+77-133 files

LLVM/project 904dbbfmlir/include/mlir/Transforms Passes.td Passes.h, mlir/lib/Transforms RemoveDeadValues.cpp

tmp commit

simple test working

draft: do not erase IR, just replace uses
DeltaFile
+184-328mlir/lib/Transforms/RemoveDeadValues.cpp
+110-45mlir/test/Transforms/remove-dead-values.mlir
+10-0mlir/include/mlir/Transforms/Passes.td
+1-0mlir/include/mlir/Transforms/Passes.h
+305-3734 files

LLVM/project 4c4344fllvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-shufflevector.ll

InstCombine: Rudimentary support of shufflevector in SimplifyDemandedFPClass

This should look more like the computeKnownFPClass handling, with knowledge
of demanded vector elements.
DeltaFile
+269-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-shufflevector.ll
+11-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+280-02 files

LLVM/project b43927cllvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-insertelement.ll

InstCombine: Basic insertelement support for SimplifyDemandedFPClass

Eventually this should pull up the known elements logic from
computeKnownFPClass.
DeltaFile
+187-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-insertelement.ll
+10-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+197-02 files

LLVM/project 78c49c5llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass.ll

InstCombine: Fix defining undef constant vector elts in SimplifyDemandedFPClass

Fold constants of known single class to the original constant instead of
a new constant. This avoids overdefining vector elements that were originally
undefined with the splat constant.
DeltaFile
+29-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass.ll
+12-2llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+41-22 files

LLVM/project 0b24580mlir/include/mlir/Interfaces ControlFlowInterfaces.td ControlFlowInterfaces.h, mlir/lib/Analysis/DataFlow SparseAnalysis.cpp

[mlir][Interfaces][NFC] Add `RegionBranchOpInterface` helper for forwarded values (#173981)

Add a helper function to compute a mapping of successor operands to
successor inputs. This mapping is computed in various places. Also add a
helper function to gather all region branch points.

This commit is in preparation of a bug fix / partial redesign of
`-remove-dead-values`. This commit also removes some duplicate code in
various places.
DeltaFile
+21-29mlir/lib/Analysis/DataFlow/SparseAnalysis.cpp
+22-23mlir/include/mlir/Interfaces/ControlFlowInterfaces.td
+44-0mlir/lib/Interfaces/ControlFlowInterfaces.cpp
+6-31mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp
+9-14mlir/lib/Dialect/XeGPU/Transforms/XeGPUPropagateLayout.cpp
+13-0mlir/include/mlir/Interfaces/ControlFlowInterfaces.h
+115-976 files

LLVM/project 5ee82dfllvm/lib/Transforms/Vectorize VPlanRecipes.cpp, llvm/test/Transforms/LoopVectorize/X86 cast-costs.ll cost-model.ll

[VPlan] Handle addrspacecast/ptrtoaddr in VPlan-based cost model.

Also handle missing PtrToAddrs and AddrSpaceCast in
getCostForRecipeWithOpcode.

This makes sure all cast opcodes are handled, fixing a crash on loops
replicating addrspacecast and ptrtoaddrs.
DeltaFile
+221-0llvm/test/Transforms/LoopVectorize/X86/cast-costs.ll
+0-99llvm/test/Transforms/LoopVectorize/X86/cost-model.ll
+6-2llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+227-1013 files

LLVM/project 33ddbfdllvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp

InstCombine: Fix another wrong interested mask computeKnownFPClass call (#174135)

Follow up from c436551d5283a8fc00ae880a5b76660b6f08e37b, this is another
instance of the same problem.
DeltaFile
+1-1llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+1-11 files

LLVM/project 92f1635clang-tools-extra/clang-tidy/google UnnamedNamespaceInHeaderCheck.cpp UnnamedNamespaceInHeaderCheck.h, clang-tools-extra/clang-tidy/misc AnonymousNamespaceInHeaderCheck.cpp AnonymousNamespaceInHeaderCheck.h

[clang-tidy] Rename google-build-namespaces to misc-anonymous-namespace-in-header (#173484)

This PR renames the check `google-build-namespaces` to
`misc-anonymous-namespace-in-header` and adds documentation on why
anonymous namespaces in headers are problematic.

Closes #170979
DeltaFile
+0-52clang-tools-extra/test/clang-tidy/checkers/google/namespaces.cpp
+52-0clang-tools-extra/test/clang-tidy/checkers/misc/anonymous-namespace-in-header.cpp
+41-0clang-tools-extra/clang-tidy/misc/AnonymousNamespaceInHeaderCheck.cpp
+0-40clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.cpp
+0-40clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h
+39-0clang-tools-extra/clang-tidy/misc/AnonymousNamespaceInHeaderCheck.h
+132-13213 files not shown
+192-14919 files

LLVM/project deaed48llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp

InstCombine: Fix another wrong interested mask computeKnownFPClass call

Follow up from c436551d5283a8fc00ae880a5b76660b6f08e37b, this is another
instance of the same problem.
DeltaFile
+1-1llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+1-11 files

LLVM/project e2e2c50llvm/lib/Target/AMDGPU AMDGPUTargetMachine.cpp, llvm/test/CodeGen/AMDGPU llc-pipeline-npm.ll

[AMDGPU][NPM] Disable few non useful passes (#172796)

Matches the legacy pipeline
DeltaFile
+3-3llvm/test/CodeGen/AMDGPU/llc-pipeline-npm.ll
+2-2llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+5-52 files

LLVM/project ebb1c27mlir/lib/Dialect/Linalg/IR LinalgOps.cpp, mlir/python/mlir/dialects/linalg/opdsl/lang emitter.py

[mlir][linalg] Reject unsigned pooling on non-integer element types (#166070)

Fixes: #164800 

Ensures unsigned pooling ops in Linalg stay in the integer domain: the
lowering now rejects floating/bool inputs with a clear diagnostic, new
regression tests lock in both the error path and a valid integer
example, and transform decompositions are updated to reflect the integer
typing.

Signed-off-by: Akimasa Watanuki <mencotton0410 at gmail.com>
DeltaFile
+119-0mlir/test/Dialect/Linalg/invalid.mlir
+72-0mlir/test/Dialect/Linalg/named-ops.mlir
+48-0mlir/test/python/dialects/linalg/opdsl/emit_pooling.py
+14-14mlir/test/Dialect/Linalg/transform-op-decompose.mlir
+12-6mlir/python/mlir/dialects/linalg/opdsl/lang/emitter.py
+14-4mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+279-242 files not shown
+279-388 files