SuccessChanges

Summary

  1. Pre-commit test case for D101970 (details)
  2. [AArch64][GlobalISel] Enable memcpy family combines on minsize functions (details)
  3. Revert "[lld][WebAssembly] Initial support merging string data" (details)
  4. [AArch64][GlobalISel] Add post-legalizer lowering for NEON vector fcmps (details)
  5. [mlir][Tensor] Add folding for tensor.from_elements (details)
  6. Reland: "[lld][WebAssembly] Initial support merging string data" (details)
  7. [gn build] Port 3b8d2be52725 (details)
  8. [AMDGPU] Constant fold Intrinsic::amdgcn_perm (details)
  9. [mlir][linalg] remove the -now- obsolete sparse support in linalg (details)
Commit a0fed635fe1701470062495a6ffee1c608f3f1bc by carrot
Pre-commit test case for D101970

This is a test case for D101970, which shows the optimization opportunity for

    lea (reg1, reg2), reg3
    sub reg3, reg4

to

    sub reg1, reg4
    sub reg2, reg4

Differential Revision: https://reviews.llvm.org/D102010
The file was addedllvm/test/CodeGen/X86/lea-opt2.ll
Commit 6d8b070d96197df6b5bf9fc2c53a78171ba64c6c by Jessica Paquette
[AArch64][GlobalISel] Enable memcpy family combines on minsize functions

The combines in `tryCombineMemCpyFamily` have heuristics (e.g.
`TLI.getMaxStoresPerMemset`) which consider size. So, theoretically, enabling
these combines on minsize functions shouldn't be harmful.

With this enabled we save 0.9% geomean on CTMark at -Oz, and 5.1% on Bullet.
There are no code size regressions.

Differential Revision: https://reviews.llvm.org/D102198
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/inline-memset.mir
Commit 061e071d8c9b98526f35cad55a918a4f1615afd4 by thakis
Revert "[lld][WebAssembly] Initial support merging string data"

This reverts commit 5000a1b4b9edeb9e994f2a5b36da8d48599bea49.
Breaks tests, see https://reviews.llvm.org/D97657#2749151

Easily repros locally with `ninja check-llvm-mc-webassembly`.
The file was removedlld/wasm/OutputSegment.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/Wasm.h
The file was modifiedllvm/lib/MC/MCSectionWasm.cpp
The file was modifiedlld/wasm/Driver.cpp
The file was modifiedllvm/lib/MC/MCParser/WasmAsmParser.cpp
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modifiedllvm/tools/obj2yaml/wasm2yaml.cpp
The file was modifiedllvm/lib/Object/WasmObjectFile.cpp
The file was removedllvm/test/MC/WebAssembly/section-flags-changed.s
The file was modifiedllvm/lib/MC/MCContext.cpp
The file was modifiedllvm/lib/MC/MCObjectFileInfo.cpp
The file was modifiedlld/wasm/InputChunks.cpp
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedllvm/include/llvm/MC/MCContext.h
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
The file was modifiedllvm/lib/ObjectYAML/WasmYAML.cpp
The file was modifiedlld/wasm/SyntheticSections.cpp
The file was modifiedlld/wasm/InputFiles.cpp
The file was modifiedlld/wasm/Symbols.cpp
The file was modifiedllvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
The file was modifiedlld/wasm/InputChunks.h
The file was modifiedlld/wasm/CMakeLists.txt
The file was removedlld/test/wasm/merge-string.s
The file was modifiedllvm/include/llvm/MC/MCSectionWasm.h
The file was modifiedlld/wasm/OutputSegment.h
Commit 79be9c59c6acd79fe4ac3a65eee569b3b65fc20f by Jessica Paquette
[AArch64][GlobalISel] Add post-legalizer lowering for NEON vector fcmps

This is roughly equivalent to the floating point portion of
`AArch64TargetLowering::LowerVSETCC`. Main part that's missing is the v4s16 bit.

This also adds helpers equivalent to `EmitVectorComparison`, and
`changeVectorFPCCToAArch64CC`. This moves `changeFCMPPredToAArch64CC` out of
the selector into AArch64GlobalISelUtils for the sake of code reuse.

This is done in post-legalizer lowering with pseudos to simplify selection.
The imported patterns end up handling selection for us this way.

Differential Revision: https://reviews.llvm.org/D101782
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/lower-neon-vector-fcmp.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64GlobalISelUtils.h
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrGISel.td
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64Combine.td
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64GlobalISelUtils.cpp
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/select-neon-vector-fcmp.mir
The file was modifiedllvm/test/CodeGen/AArch64/neon-compare-instructions.ll
Commit 7b52aeadfa38c8a1fc0e97066f50900f1efafd42 by benny.kra
[mlir][Tensor] Add folding for tensor.from_elements

This trivially folds into a constant when all operands are constant.

Differential Revision: https://reviews.llvm.org/D102199
The file was modifiedmlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
The file was modifiedmlir/test/Dialect/Linalg/detensorize_trivial.mlir
The file was modifiedmlir/test/Dialect/Tensor/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/Tensor/IR/TensorOps.cpp
Commit 3b8d2be527259b303d6c3428df16fb3fd02af2bc by sbc
Reland: "[lld][WebAssembly] Initial support merging string data"

This change was originally landed in: 5000a1b4b9edeb9e994f2a5b36da8d48599bea49
It was reverted in: 061e071d8c9b98526f35cad55a918a4f1615afd4

This change adds support for a new WASM_SEG_FLAG_STRINGS flag in
the object format which works in a similar fashion to SHF_STRINGS
in the ELF world.

Unlike the ELF linker this support is currently limited:
- No support for SHF_MERGE (non-string merging)
- Always do full tail merging ("lo" can be merged with "hello")
- Only support single byte strings (p2align 0)

Like the ELF linker merging is only performed at `-O1` and above.

This fixes part of https://bugs.llvm.org/show_bug.cgi?id=48828,
although crucially it doesn't not currently support debug sections
because they are not represented by data segments (they are custom
sections)

Differential Revision: https://reviews.llvm.org/D97657
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
The file was modifiedllvm/include/llvm/MC/MCSectionWasm.h
The file was modifiedllvm/lib/MC/MCSectionWasm.cpp
The file was modifiedlld/wasm/InputFiles.cpp
The file was modifiedllvm/test/MC/WebAssembly/unnamed-data.ll
The file was modifiedllvm/lib/MC/MCParser/WasmAsmParser.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/Wasm.h
The file was modifiedllvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
The file was modifiedlld/wasm/CMakeLists.txt
The file was addedlld/test/wasm/merge-string.s
The file was modifiedllvm/lib/MC/MCContext.cpp
The file was addedllvm/test/MC/WebAssembly/section-flags-changed.s
The file was modifiedlld/wasm/Driver.cpp
The file was modifiedlld/wasm/Symbols.cpp
The file was modifiedllvm/tools/obj2yaml/wasm2yaml.cpp
The file was modifiedlld/wasm/InputChunks.h
The file was modifiedllvm/lib/MC/MCObjectFileInfo.cpp
The file was modifiedlld/wasm/OutputSegment.h
The file was modifiedlld/wasm/InputChunks.cpp
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modifiedllvm/lib/ObjectYAML/WasmYAML.cpp
The file was modifiedllvm/lib/Object/WasmObjectFile.cpp
The file was modifiedlld/wasm/SyntheticSections.cpp
The file was modifiedllvm/include/llvm/MC/MCContext.h
The file was addedlld/wasm/OutputSegment.cpp
Commit 0077dce361ae54ddb5d7da02665795cfb7aab125 by llvmgnsyncbot
[gn build] Port 3b8d2be52725
The file was modifiedllvm/utils/gn/secondary/lld/wasm/BUILD.gn
Commit 22d295f6953c07129837703c811fdda83775e75e by Stanislav.Mekhanoshin
[AMDGPU] Constant fold Intrinsic::amdgcn_perm

Differential Revision: https://reviews.llvm.org/D102203
The file was addedllvm/test/Transforms/InstSimplify/ConstProp/AMDGPU/perm.ll
The file was modifiedllvm/lib/Analysis/ConstantFolding.cpp
Commit bf812ea484b71ec41d6811646d89876499956235 by ajcbik
[mlir][linalg] remove the -now- obsolete sparse support in linalg

All glue and clutter in the linalg ops has been replaced by proper
sparse tensor type encoding. This code is no longer needed. Thanks
to ntv@ for giving us a temporary home in linalg.

So long, and thanks for all the fish.

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D102098
The file was modifiedmlir/python/mlir/dialects/linalg/opdsl/lang/emitter.py
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
The file was modifiedmlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h