SuccessChanges

Summary

  1. AArch64: use correct operand for ubsantrap immediate. (details)
  2. [OpenMPIRBuilder] Put the barrier in the exit block in createWorkshapeLoop (details)
  3. [VP] Build VP SDNodes (details)
  4. [IR] Support scalable vectors in CastInst::CreatePointerCast (details)
  5. [SelectionDAG] Add llvm.vector.{extract,insert} intrinsics (details)
  6. [mlir] Use mlir::OpState::operator->() to get to methods of mlir::Operation. This is a preparation step to remove the corresponding methods from OpState. (details)
  7. [SVE][CodeGen] Add the ExtensionType flag to MGATHER (details)
  8. [LoopVectorizer] NFC: Remove unnecessary asserts that VF cannot be scalable. (details)
  9. [LoopVectorizer][SVE] Vectorize a simple loop with with a scalable VF. (details)
  10. [SVE][CodeGen] Add DAG combines for s/zext_masked_gather (details)
  11. [Debuginfo] [CSInfo] Do not create CSInfo for undef arguments (details)
Commit 45de42116e3f588bbead550ab8667388ba4f10ae by Tim Northover
AArch64: use correct operand for ubsantrap immediate.

I accidentally pushed the wrong patch originally.
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/ubsantrap.ll
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
Commit f31704f8ae32a24147fac686f4e922c5c762cfe0 by zinenko
[OpenMPIRBuilder] Put the barrier in the exit block in createWorkshapeLoop

The original code was inserting the barrier at the location given by the
caller. Make sure it is always inserted at the end of the loop exit block
instead.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D92849
The file was modifiedllvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
The file was modifiedllvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
Commit 3ffbc7935718bd792f2947e90dfcf61e8cc5fb97 by simon.moll
[VP] Build VP SDNodes

Translate VP intrinsics to VP_* SDNodes.  The tests check whether a
matching vp_* SDNode is emitted.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D91441
The file was addedllvm/test/CodeGen/VE/Vector/vp_shl.ll
The file was modifiedllvm/include/llvm/CodeGen/ISDOpcodes.h
The file was addedllvm/test/CodeGen/VE/Vector/vp_and.ll
The file was addedllvm/test/CodeGen/VE/Vector/vp_sub.ll
The file was addedllvm/test/CodeGen/VE/Vector/vp_lshr.ll
The file was addedllvm/test/CodeGen/VE/Vector/vp_ashr.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
The file was addedllvm/test/CodeGen/VE/Vector/vp_xor.ll
The file was addedllvm/test/CodeGen/VE/Vector/vp_sdiv.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was addedllvm/test/CodeGen/VE/Vector/vp_srem.ll
The file was modifiedllvm/lib/IR/IntrinsicInst.cpp
The file was addedllvm/test/CodeGen/VE/Vector/vp_add.ll
The file was modifiedllvm/include/llvm/IR/VPIntrinsics.def
The file was addedllvm/test/CodeGen/VE/Vector/vp_urem.ll
The file was addedllvm/test/CodeGen/VE/Vector/vp_mul.ll
The file was addedllvm/test/CodeGen/VE/Vector/vp_or.ll
The file was addedllvm/test/CodeGen/VE/Vector/vp_udiv.ll
Commit 4167a0259ec33a11530a6503e96acedaf3cb6a3d by cullen.rhodes
[IR] Support scalable vectors in CastInst::CreatePointerCast

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D92482
The file was modifiedllvm/unittests/IR/InstructionsTest.cpp
The file was modifiedllvm/lib/IR/Instructions.cpp
Commit 80c33de2d3c59ca357c67b2b2475d27f79dd8a8b by joe.ellis
[SelectionDAG] Add llvm.vector.{extract,insert} intrinsics

This commit adds two new intrinsics.

- llvm.experimental.vector.insert: used to insert a vector into another
  vector starting at a given index.

- llvm.experimental.vector.extract: used to extract a subvector from a
  larger vector starting from a given index.

The codegen work for these intrinsics has already been completed; this
commit is simply exposing the existing ISD nodes to LLVM IR.

Reviewed By: cameron.mcinally

Differential Revision: https://reviews.llvm.org/D91362
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/include/llvm/IR/Intrinsics.td
The file was addedllvm/test/CodeGen/AArch64/sve-insert-vector.ll
The file was addedllvm/test/Transforms/InstCombine/canonicalize-vector-insert.ll
The file was modifiedllvm/lib/IR/Verifier.cpp
The file was addedllvm/test/Transforms/InstCombine/canonicalize-vector-extract.ll
The file was modifiedllvm/docs/LangRef.rst
The file was addedllvm/test/CodeGen/AArch64/sve-extract-vector.ll
The file was addedllvm/test/Verifier/extract-vector-mismatched-element-types.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was addedllvm/test/Verifier/insert-vector-mismatched-element-types.ll
Commit 0bf4a82a5a2b11a07a7f7eac5e49b565cb041b13 by csigg
[mlir] Use mlir::OpState::operator->() to get to methods of mlir::Operation. This is a preparation step to remove the corresponding methods from OpState.

Reviewed By: silvas, rriddle

Differential Revision: https://reviews.llvm.org/D92878
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUOps.td
The file was modifiedmlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/lib/Dialect/PDL/IR/PDL.cpp
The file was modifiedmlir/lib/Dialect/SCF/Transforms/Utils.cpp
The file was modifiedmlir/test/lib/Transforms/TestLoopParametricTiling.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedmlir/examples/toy/Ch4/mlir/Dialect.cpp
The file was modifiedmlir/test/lib/Transforms/TestLoopMapping.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
The file was modifiedmlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp
The file was modifiedmlir/lib/Dialect/SCF/Transforms/StructuralTypeConversions.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.cpp
The file was modifiedmlir/lib/Conversion/SCFToSPIRV/SCFToSPIRV.cpp
The file was modifiedmlir/lib/Dialect/GPU/Transforms/AsyncRegionRewriter.cpp
The file was modifiedmlir/lib/Transforms/Utils/LoopFusionUtils.cpp
The file was modifiedmlir/lib/Dialect/Affine/Utils/Utils.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
The file was modifiedmlir/lib/Dialect/Vector/VectorTransforms.cpp
The file was modifiedmlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
The file was modifiedmlir/lib/Dialect/Shape/IR/Shape.cpp
The file was modifiedmlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.h
The file was modifiedmlir/lib/Dialect/SCF/SCF.cpp
The file was modifiedmlir/lib/Transforms/LoopCoalescing.cpp
The file was modifiedmlir/examples/toy/Ch3/mlir/Dialect.cpp
The file was modifiedmlir/include/mlir/Dialect/Vector/VectorOps.td
The file was modifiedmlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
The file was modifiedmlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
The file was modifiedmlir/lib/Transforms/Inliner.cpp
The file was modifiedmlir/examples/toy/Ch2/mlir/Dialect.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
The file was modifiedmlir/lib/Dialect/Shape/Transforms/ShapeToShapeLowering.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/CodegenStrategy.cpp
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/examples/toy/Ch6/mlir/Dialect.cpp
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/lib/Transforms/Utils/InliningUtils.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp
The file was modifiedmlir/test/mlir-tblgen/op-attribute.td
The file was modifiedmlir/examples/toy/Ch7/mlir/Dialect.cpp
The file was modifiedmlir/lib/Dialect/Async/IR/Async.cpp
The file was modifiedmlir/lib/Dialect/Vector/VectorTransferOpTransforms.cpp
The file was modifiedmlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp
The file was modifiedmlir/test/lib/Transforms/TestAffineLoopParametricTiling.cpp
The file was modifiedflang/include/flang/Optimizer/Dialect/FIROps.td
The file was modifiedmlir/test/lib/Dialect/Shape/TestShapeFunctions.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/Dialect.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/Transforms/DecorateSPIRVCompositeTypeLayoutPass.cpp
The file was modifiedmlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
The file was modifiedmlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
The file was modifiedmlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp
The file was modifiedmlir/lib/Dialect/Affine/IR/AffineOps.cpp
The file was modifiedmlir/test/lib/Transforms/TestLinalgFusionTransforms.cpp
The file was modifiedmlir/test/lib/IR/TestFunc.cpp
Commit 4519ff4b6f02defcb69ea49bc11607cee09cde7b by kerry.mclaughlin
[SVE][CodeGen] Add the ExtensionType flag to MGATHER

Adds the ExtensionType flag, which reflects the LoadExtType of a MaskedGatherSDNode.
Also updated SelectionDAGDumper::print_details so that details of the gather
load (is signed, is scaled & extension type) are printed.

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D91084
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/include/llvm/CodeGen/SelectionDAG.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/include/llvm/CodeGen/SelectionDAGNodes.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
Commit adc37145dec9cadf76af05326150ed22a3cc2fdd by sander.desmalen
[LoopVectorizer] NFC: Remove unnecessary asserts that VF cannot be scalable.

This patch removes a number of asserts that VF is not scalable, even though
the code where this assert lives does nothing that prevents VF being scalable.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D91060
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Commit d568cff696e8fb89ce1b040561c037412767af60 by sander.desmalen
[LoopVectorizer][SVE] Vectorize a simple loop with with a scalable VF.

* Steps are scaled by `vscale`, a runtime value.
* Changes to circumvent the cost-model for now (temporary)
  so that the cost-model can be implemented separately.

This can vectorize the following loop [1]:

   void loop(int N, double *a, double *b) {
     #pragma clang loop vectorize_width(4, scalable)
     for (int i = 0; i < N; i++) {
       a[i] = b[i] + 1.0;
     }
   }

[1] This source-level example is based on the pragma proposed
separately in D89031. This patch only implements the LLVM part.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D91077
The file was modifiedllvm/lib/IR/IRBuilder.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.h
The file was addedllvm/test/Transforms/LoopVectorize/scalable-loop-unpredicated-body-scalar-tail.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/metadata-width.ll
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/include/llvm/IR/IRBuilder.h
Commit 05edfc54750bd539f5caa30b0cd4344f68677b00 by kerry.mclaughlin
[SVE][CodeGen] Add DAG combines for s/zext_masked_gather

This patch adds the following DAGCombines, which apply if isVectorLoadExtDesirable() returns true:
- fold (and (masked_gather x)) -> (zext_masked_gather x)
- fold (sext_inreg (masked_gather x)) -> (sext_masked_gather x)

LowerMGATHER has also been updated to fetch the LoadExtType associated with the
gather and also use this value to determine the correct masked gather opcode to use.

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D92230
The file was modifiedllvm/test/CodeGen/AArch64/sve-masked-gather-32b-unsigned-unscaled.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-masked-gather-32b-signed-scaled.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/sve-masked-gather-32b-signed-unscaled.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-masked-gather-64b-scaled.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-masked-gather-legalize.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-masked-gather-64b-unscaled.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/AArch64/sve-masked-gather-32b-unsigned-scaled.ll
Commit 163c223161b8cd33e812613b27fbc52ea6e0f880 by djolertrk
[Debuginfo] [CSInfo] Do not create CSInfo for undef arguments

If a function parameter is marked as "undef", prevent creation
of CallSiteInfo for that parameter.
Without this patch, the parameter's call_site_value would be incorrect.
The incorrect call_value case reported in PR39716,
addressed in D85111.

Patch by Nikola Tesic

Differential revision: https://reviews.llvm.org/D92471
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was addedllvm/test/DebugInfo/X86/dbg-call-site-undef-params.ll