SuccessChanges

Summary

  1. Revert "[LV] Unconditionally branch from middle to scalar preheader if the scalar loop must execute" (details)
  2. [AMDGPU] Do not check denorm for LDS FP atomic with unsafe flag (details)
  3. [LV] Unconditionally branch from middle to scalar preheader if the scalar loop must execute (try 3) (details)
  4. [lld/mac] Inline a check (details)
  5. [lldb/API] Use a valid LineEntry object in SBCompileUnit::FindLineEntryIndex (details)
  6. [mlir][tosa] Cleanup of tosa.rescale lowering to linalg (details)
  7. [Matrix] Fold the transpose into the matmul operand used to fetch scalars (details)
  8. [NFC][OpaquePtr] Avoid using PointerType::getElementType() in VectorUtils.cpp (details)
  9. [NFC] Pass GV value type instead of pointer type to GetOrCreateLLVMGlobal (details)
  10. [Polly] Add support for -polly-dump-before(-file) with the NPM. (details)
Commit d16da7343d40bc974c1906a271128fbaa3035db5 by listmail
Revert "[LV] Unconditionally branch from middle to scalar preheader if the scalar loop must execute"

This reverts commit c23ce54b36b1a52eb280ea1d59802b56d6dd9800.  I apparently missed some newly added non-x86 tests.
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/interleaved-accesses.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/loop-form.ll
The file was modifiedllvm/lib/Transforms/Utils/LoopVersioning.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/first-order-recurrence-complex.ll
Commit 45764efb6928bdd6fa4260f4ac6b9b6d12180301 by Stanislav.Mekhanoshin
[AMDGPU] Do not check denorm for LDS FP atomic with unsafe flag

This is already how it is handled for global and flat atomics.

Differential Revision: https://reviews.llvm.org/D102366
The file was modifiedllvm/test/CodeGen/AMDGPU/fp64-atomics-gfx90a.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
Commit 6d3e3ae8a9ca10e063d541a959f4fe4cdb003dba by listmail
[LV] Unconditionally branch from middle to scalar preheader if the scalar loop must execute (try 3)

Resubmit after fixing test/Transforms/LoopVectorize/ARM/mve-gather-scatter-tailpred.ll

Previous commit message...

This is a resubmit of 3e5ce4 (which was reverted by 7fe41ac).  The original commit caused a PPC build bot failure we never really got to the bottom of.  I can't reproduce the issue, and the bot owner was non-responsive.  In the meantime, we stumbled across an issue which seems possibly related, and worked around a latent bug in 80e8025.  My best guess is that the original patch exposed that latent issue at higher frequency, but it really is just a guess.

Original commit message follows...

If we know that the scalar epilogue is required to run, modify the CFG to end the middle block with an unconditional branch to scalar preheader. This is instead of a conditional branch to either the preheader or the exit block.

The motivation to do this is to support multiple exit blocks. Specifically, the current structure forces us to identify immediate dominators and *which* exit block to branch from in the middle terminator. For the multiple exit case - where we know require scalar will hold - these questions are ill formed.

This is the last change needed to support multiple exit loops, but since the diffs are already large enough, I'm going to land this, and then enable separately. You can think of this as being NFCIish prep work, but the changes are a bit too involved for me to feel comfortable tagging the review that way.

Differential Revision: https://reviews.llvm.org/D94892
The file was modifiedllvm/lib/Transforms/Utils/LoopVersioning.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/interleaved-accesses.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/first-order-recurrence-complex.ll
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/loop-form.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/mve-gather-scatter-tailpred.ll
Commit bc588f9961117d5705e97eb2191e901e92fe9094 by thakis
[lld/mac] Inline a check

`match()` can only return for non-empty vectors, but at least in
non-LTO builds that isn't clear to the compiler. Help it out.
This is a minor but measurable speedup on my machine (but less
than what we might've lost in https://reviews.llvm.org/D100818#2764272 --
bot note higher N on this measurement here, so higher confidence here):

    % ministat at_main at_branch
    x at_main
    + at_branch
        N           Min           Max        Median           Avg        Stddev
    x  30     3.9243979     4.0395119      3.987375     3.9826236   0.027567796
    +  30     3.8495831     4.0009291      3.931325     3.9347135   0.037832878
    Difference at 95.0% confidence
            -0.0479101 +/- 0.0171102
            -1.20298% +/- 0.429622%
            (Student's t, pooled s = 0.0331007)

No behavior change.

Eventually we should apply these lists at symbol parse time instead of
every time shouldExportSymbol() though :)

Differential Revision: https://reviews.llvm.org/D102655
The file was modifiedlld/MachO/SyntheticSections.cpp
Commit 1b4d5b3bf30656d39d94985a63f1c0514fcc6526 by medismail.bennani
[lldb/API] Use a valid LineEntry object in SBCompileUnit::FindLineEntryIndex

This patch updates `SBCompileUnit::FindLineEntryIndex` to pass a valid
`LineEntry` pointer to `CompileUnit::FindLineEntry`.

This caused `LineTable::FindLineEntryIndexByFileIndexImpl` to return its
`best_match` initial value (UINT32_MAX).

rdar://78115426

Differential Revision: https://reviews.llvm.org/D102658

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was addedlldb/test/API/functionalities/find-line-entry/Makefile
The file was modifiedlldb/source/API/SBCompileUnit.cpp
The file was addedlldb/test/API/functionalities/find-line-entry/TestFindLineEntry.py
The file was addedlldb/test/API/functionalities/find-line-entry/main.c
Commit a91fb4328f255298dcc17dcb982db6831a53f81a by rob.suderman
[mlir][tosa] Cleanup of tosa.rescale lowering to linalg

Comment was poorly written. Changed to bail on contradictory information in
the double round.

Reviewed By: NatashaKnk

Differential Revision: https://reviews.llvm.org/D102651
The file was modifiedmlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
The file was modifiedmlir/lib/Conversion/TosaToStandard/TosaToStandard.cpp
Commit fcffd087c6bc1364678c1549ffc7a26fd8bea930 by anemet
[Matrix] Fold the transpose into the matmul operand used to fetch scalars

For column-major this is:
  A * B^t
whereas for row-major:
  A^t * B

Differential Revision: https://reviews.llvm.org/D101762
The file was modifiedllvm/test/Transforms/LowerMatrixIntrinsics/multiply-double-row-major.ll
The file was addedllvm/test/Transforms/LowerMatrixIntrinsics/multiply-left-transpose-row-major.ll
The file was addedllvm/test/Transforms/LowerMatrixIntrinsics/multiply-right-transpose.ll
The file was modifiedllvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
Commit cc64ece77dddfa7aa590b6d69fe026fcd64d00cf by aeubanks
[NFC][OpaquePtr] Avoid using PointerType::getElementType() in VectorUtils.cpp

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D102533
The file was modifiedllvm/lib/Analysis/VectorUtils.cpp
The file was modifiedllvm/include/llvm/IR/Instructions.h
Commit 9f7d552cff8d62250461ef396d9d4ffab4ecd378 by aeubanks
[NFC] Pass GV value type instead of pointer type to GetOrCreateLLVMGlobal

For opaque pointers, to avoid PointerType::getElementType().

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D102638
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedclang/lib/CodeGen/CodeGenModule.h
The file was modifiedclang/lib/CodeGen/CGBlocks.cpp
Commit 29bef8e4e3593ab37c4d3b6289dcdec961c3fb52 by llvm-project
[Polly] Add support for -polly-dump-before(-file) with the NPM.

Only supported with -polly-position=early. Unfortunately, the
extension point callpack for VectorizerStart only passes a
FunctionPassManager, making it impossible to add a module pass.
The file was modifiedpolly/lib/Support/RegisterPasses.cpp
The file was modifiedpolly/include/polly/LinkAllPasses.h
The file was addedpolly/test/Support/dumpmodule.ll
The file was modifiedpolly/include/polly/Support/DumpModulePass.h
The file was modifiedpolly/lib/Support/DumpModulePass.cpp