SuccessChanges

Summary

  1. [mlir][Vector] Add a folder for vector.broadcast (details)
  2. [AArch64][GlobalISel] Fix bug in fewVectorElts action while legalizing oversize G_FPTRUNC vectors. (details)
  3. [ARM] Expand distributing increments to also handle existing pre/post inc instructions. (details)
  4. [InstSimplify] add tests for FP constant miscompile; NFC (PR43907) (details)
  5. [amdgpu] Compilation fix for Release (details)
  6. [SyntaxTree][Synthesis] Fix allocation in `createTree` for more general use (details)
  7. [DFSan] Add bcmp wrapper. (details)
  8. [Sema] Introduce BuiltinAttr, per-declaration builtin-ness (details)
  9. [AMDGPU] Fix ROCm unit test memref initialization (details)
  10. Add missing include (details)
  11. [PowerPC][AIX] Don't hardcode python invoke command line (details)
  12. [VectorCombine] add test for multi-use load (PR47558); NFC (details)
  13. [VectorCombine] rearrange bailouts for load insert for efficiency; NFC (details)
  14. Revert "[CUDA][HIP] Defer overloading resolution diagnostics for host device functions" (details)
  15. Revert "[NFC] Refactor DiagnosticBuilder and PartialDiagnostic" (details)
  16. [MLIR] Support for return values in Affine.For yield (details)
  17. [MLIR][Affine] Add parametric tile size support for affine.for tiling (details)
Commit f16abe5f84eee8db18d5eb5a21ab543146626ea6 by hanchung
[mlir][Vector] Add a folder for vector.broadcast

Fold the operation if the source is a scalar constant or splat constant.

Update transform-patterns-matmul-to-vector.mlir because the broadcast ops are folded in the conversion.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D87703
The file was modifiedmlir/test/Dialect/Vector/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/Vector/VectorOps.cpp
The file was modifiedmlir/test/Dialect/Linalg/transform-patterns-matmul-to-vector.mlir
The file was modifiedmlir/include/mlir/Dialect/Vector/VectorOps.td
Commit 79b21fc187643416dbd21db10abe46a91b4c3f09 by Amara Emerson
[AArch64][GlobalISel] Fix bug in fewVectorElts action while legalizing oversize G_FPTRUNC vectors.

For <8 x s32> = fptrunc <8 x s64> the fewerElementsVector action tries to break
down the source vector into the final source vectors of <2 x s64> using unmerge.
This fixes a crash due to using the wrong number of elements for the breakdown
type.

Also add some legalizer tests for explicitly G_FPTRUNC which we didn't have.

Differential Revision: https://reviews.llvm.org/D87814
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/legalize-fptrunc.mir
The file was modifiedllvm/test/CodeGen/AArch64/arm64-vcvt.ll
Commit 7f7993e0daf459c308747f034e3fbd73889c7ab3 by david.green
[ARM] Expand distributing increments to also handle existing pre/post inc instructions.

This extends the distributing postinc code in load/store optimizer to
also handle the case where there is an existing pre/post inc instruction,
where subsequent instructions can be modified to use the adjusted
offset from the increment. This can save us having to keep the old
register live past the increment instruction.

Differential Revision: https://reviews.llvm.org/D83377
The file was modifiedllvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/mve-postinc-distribute.mir
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vst3.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vst2.ll
Commit c6ebe3fd002c1d3b903ab6e912ebd815fdb0e964 by spatel
[InstSimplify] add tests for FP constant miscompile; NFC (PR43907)
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/cast.ll
Commit 7d593d0d6905b55ca1124fca5e4d1ebb17203138 by benny.kra
[amdgpu] Compilation fix for Release

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D87838
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
Commit 1e19165bd89db6671a80e0b25b32d5c7ae79455c by ecaldas
[SyntaxTree][Synthesis] Fix allocation in `createTree` for more general use

Prior to this change `createTree` could not create arbitrary syntax
trees. Now it dispatches to the constructor of the concrete syntax tree
according to the `NodeKind` passed as argument. This allows reuse inside
the Synthesis API.  # Please enter the commit message for your changes.
Lines starting

Differential Revision: https://reviews.llvm.org/D87820
The file was modifiedclang/include/clang/Tooling/Syntax/BuildTree.h
The file was modifiedclang/lib/Tooling/Syntax/Synthesis.cpp
Commit 50dd545b00ed72a9ed2031cb5eb9bf26dd5af0c0 by mascasa
[DFSan] Add bcmp wrapper.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D87801
The file was modifiedcompiler-rt/lib/dfsan/dfsan_custom.cpp
The file was modifiedcompiler-rt/test/dfsan/custom.cpp
The file was modifiedcompiler-rt/lib/dfsan/done_abilist.txt
Commit e09107ab80dced55414fa458cf78e6cdfe90da6e by raul.tambre
[Sema] Introduce BuiltinAttr, per-declaration builtin-ness

Instead of relying on whether a certain identifier is a builtin, introduce BuiltinAttr to specify a declaration as having builtin semantics.

This fixes incompatible redeclarations of builtins, as reverting the identifier as being builtin due to one incompatible redeclaration would have broken rest of the builtin calls.
Mostly-compatible redeclarations of builtins also no longer have builtin semantics. They don't call the builtin nor inherit their attributes.
A long-standing FIXME regarding builtins inside a namespace enclosed in extern "C" not being recognized is also addressed.

Due to the more correct handling attributes for builtin functions are added in more places, resulting in more useful warnings.
Tests are updated to reflect that.

Intrinsics without an inline definition in intrin.h had `inline` and `static` removed as they had no effect and caused them to no longer be recognized as builtins otherwise.

A pthread_create() related test is XFAIL-ed, as it relied on it being recognized as a builtin based on its name.
The builtin declaration syntax is too restrictive and doesn't allow custom structs, function pointers, etc.
It seems to be the only case and fixing this would require reworking the current builtin syntax, so this seems acceptable.

Fixes PR45410.

Reviewed By: rsmith, yutsumi

Differential Revision: https://reviews.llvm.org/D77491
The file was modifiedclang/test/Sema/warn-fortify-source.c
The file was modifiedclang/include/clang/Basic/Attr.td
The file was modifiedclang/test/Sema/implicit-builtin-decl.c
The file was modifiedclang/test/SemaCXX/cxx11-compat.cpp
The file was modifiedclang/lib/Headers/intrin.h
The file was modifiedclang/lib/Serialization/ASTReader.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was addedclang/test/CodeGen/builtin-redeclaration.c
The file was modifiedclang/include/clang/Basic/Builtins.def
The file was modifiedclang/lib/AST/Decl.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/test/CodeGen/callback_pthread_create.c
The file was modifiedclang/lib/Sema/SemaLookup.cpp
The file was modifiedclang/lib/Serialization/ASTWriter.cpp
The file was modifiedclang/test/CodeGenCXX/builtins.cpp
The file was modifiedclang/test/AST/ast-dump-attr.cpp
The file was modifiedclang/test/SemaCXX/warn-unused-local-typedef.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/include/clang/Basic/IdentifierTable.h
Commit fb182028361504569ff6322bfa12b12e1ab74e30 by zhuoryin
[AMDGPU] Fix ROCm unit test memref initialization
The file was modifiedmlir/test/mlir-rocm-runner/vector-transferops.mlir
The file was modifiedmlir/test/mlir-rocm-runner/vecadd.mlir
The file was modifiedmlir/tools/mlir-rocm-runner/mlir-rocm-runner.cpp
Commit dd28254063f27ed6accd8f331d292217663ebaf8 by Adrian Prantl
Add missing include
The file was modifiedllvm/include/llvm/Transforms/InstCombine/InstCombiner.h
Commit 50f1d4517ae46a43b9bd1b488cc632b65de0dbbe by Jinsong Ji
[PowerPC][AIX] Don't hardcode python invoke command line

We shouldn't assume python exists, we should let lit
to decide whether it is python or python3 and expand the path.
The file was modifiedllvm/test/CodeGen/PowerPC/aix-overflow-toc.py
Commit e06914b59bf8e2344969def6f20b394cacce186b by spatel
[VectorCombine] add test for multi-use load (PR47558); NFC
The file was modifiedllvm/test/Transforms/VectorCombine/X86/load.ll
Commit ddd9575d15ad8f0fa746b5ece63530c4619e3e9c by spatel
[VectorCombine] rearrange bailouts for load insert for efficiency; NFC
The file was modifiedllvm/lib/Transforms/Vectorize/VectorCombine.cpp
Commit 772bd8a7d99b8db899f594d393986e4b6cd85aa1 by Yaxun.Liu
Revert "[CUDA][HIP] Defer overloading resolution diagnostics for host device functions"

This reverts commit 7f1f89ec8d9944559042bb6d3b1132eabe3409de.

This reverts commit 40df06cdafc010002fc9cfe1dda73d689b7d27a6.
The file was modifiedclang/lib/Sema/SemaTemplateInstantiate.cpp
The file was modifiedclang/lib/Sema/SemaTemplateVariadic.cpp
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/lib/Basic/DiagnosticIDs.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSerialization.h
The file was modifiedclang/lib/Sema/SemaStmtAsm.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticCrossTU.h
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/lib/Sema/SemaAttr.cpp
The file was modifiedclang/lib/Sema/SemaExprObjC.cpp
The file was removedclang/test/TableGen/deferred-diag.td
The file was modifiedclang/include/clang/Basic/DiagnosticFrontend.h
The file was modifiedclang/include/clang/Basic/DiagnosticIDs.h
The file was modifiedclang/test/TableGen/DiagnosticBase.inc
The file was modifiedclang/utils/TableGen/ClangDiagnosticsEmitter.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticParse.h
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp
The file was modifiedclang/lib/Sema/SemaSYCL.cpp
The file was modifiedclang/lib/Sema/AnalysisBasedWarnings.cpp
The file was modifiedclang/lib/Sema/SemaTemplateInstantiateDecl.cpp
The file was modifiedclang/lib/Sema/SemaOverload.cpp
The file was modifiedclang-tools-extra/clangd/Diagnostics.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSema.h
The file was modifiedclang/lib/Driver/ToolChains/Cuda.cpp
The file was modifiedclang/lib/Sema/SemaCUDA.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/include/clang/Basic/DiagnosticAnalysis.h
The file was modifiedclang/include/clang/Basic/LangOptions.def
The file was modifiedclang/include/clang/Basic/DiagnosticDriver.h
The file was modifiedclang/tools/diagtool/DiagnosticNames.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/include/clang/Basic/Diagnostic.td
The file was modifiedclang/lib/Sema/SemaType.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticAST.h
The file was modifiedclang/include/clang/Basic/DiagnosticLex.h
The file was modifiedclang/include/clang/Basic/DiagnosticComment.h
The file was modifiedclang/include/clang/Basic/DiagnosticRefactoring.h
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was removedclang/test/SemaCUDA/deferred-oeverload.cu
Commit 829d14ee0a6aa79c89f7f3d9fcd9d27d3efd2b91 by Yaxun.Liu
Revert "[NFC] Refactor DiagnosticBuilder and PartialDiagnostic"

This reverts commit ee5519d323571c4a9a7d92cb817023c9b95334cd.
The file was modifiedclang/lib/AST/TemplateBase.cpp
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/lib/Basic/Diagnostic.cpp
The file was modifiedclang/include/clang/Basic/Diagnostic.h
The file was modifiedclang/include/clang/AST/Decl.h
The file was modifiedclang/include/clang/AST/TemplateBase.h
The file was modifiedclang/include/clang/Sema/ParsedAttr.h
The file was modifiedclang/include/clang/AST/Attr.h
The file was modifiedclang/include/clang/AST/DeclCXX.h
The file was modifiedclang/include/clang/AST/TemplateName.h
The file was modifiedclang/include/clang/AST/CanonicalType.h
The file was modifiedclang/include/clang/AST/NestedNameSpecifier.h
The file was modifiedclang/include/clang/Basic/PartialDiagnostic.h
The file was modifiedclang/lib/AST/DeclCXX.cpp
The file was modifiedclang/include/clang/Sema/Ownership.h
The file was modifiedclang/include/clang/AST/ASTContext.h
The file was modifiedclang/include/clang/AST/DeclarationName.h
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/include/clang/AST/Type.h
The file was modifiedclang/lib/AST/TemplateName.cpp
Commit 296e97ae8f7183c2f8737b9e6e68df4904dbfadf by uday
[MLIR] Support for return values in Affine.For yield

Add support for return values in affine.for yield along the same lines
as scf.for and affine.parallel.

Signed-off-by: Abhishek Varma <abhishek.varma@polymagelabs.com>

Differential Revision: https://reviews.llvm.org/D87437
The file was modifiedmlir/lib/Dialect/Affine/IR/AffineOps.cpp
The file was modifiedmlir/include/mlir/Dialect/Affine/EDSC/Builders.h
The file was modifiedmlir/test/Dialect/Affine/invalid.mlir
The file was modifiedmlir/test/EDSC/builder-api-test.cpp
The file was modifiedmlir/include/mlir/Dialect/Affine/IR/AffineOps.td
The file was modifiedmlir/lib/Dialect/Affine/EDSC/Builders.cpp
The file was modifiedmlir/test/Dialect/Affine/ops.mlir
Commit 0602e8f77f8662c85155b8cf02937a2e71c01e12 by uday
[MLIR][Affine] Add parametric tile size support for affine.for tiling

Add support to tile affine.for ops with parametric sizes (i.e., SSA
values). Currently supports hyper-rectangular loop nests with constant
lower bounds only. Move methods

  - moveLoopBody(*)
  - getTileableBands(*)
  - checkTilingLegality(*)
  - tilePerfectlyNested(*)
  - constructTiledIndexSetHyperRect(*)

to allow reuse with constant tile size API. Add a test pass -test-affine
-parametric-tile to test parametric tiling.

Differential Revision: https://reviews.llvm.org/D87353
The file was addedmlir/test/Dialect/Affine/loop-tiling-parametric.mlir
The file was modifiedmlir/test/lib/Transforms/CMakeLists.txt
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/include/mlir/Transforms/LoopUtils.h
The file was modifiedmlir/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedmlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp
The file was addedmlir/test/lib/Transforms/TestAffineLoopParametricTiling.cpp