AbortedChanges

Summary

  1. [AArch64][SVE] Asm: Fix supported immediates for DUP/CPY (details)
  2. [clang-check] Add tokens-dump in clang-check. (details)
  3. [LoopVectorize] NFC: Change selectVectorizationFactor to work on ElementCount. (details)
  4. [Syntax] NFC, Simplify a test with annotations (details)
  5. [Syntax] Remove a strict valid source location assertion for TypeLoc. (details)
  6. [ARM] Make a BE predicate bitcast consistent with the rest of llvm (details)
  7. Expand masked mem intrinsics correctly wrt big-endian (details)
  8. [mlir][gpu] Allow all dialects in SCF to GPU conversion. (details)
  9. [TTI] Change TargetTransformInfo::getMinimumVF to return ElementCount (details)
  10. [OpenCL] Add cl_khr_subgroup_extended_types to TableGen BIFs (details)
  11. [DebugInfo] Prevent inlining in NRVO-string test cases (details)
  12. [CodeComplete] Member completion: heuristically resolve some dependent base exprs (details)
  13. [clang][index] report references from unreslovedLookupExpr. (details)
  14. [ARM] Remove dead mov's in preheader of tail predicated loops (details)
  15. Revert "[Codegenprepare][X86] Use usub with overflow opt for IV increment" (details)
  16. NFC: Migrate CodeMetrics to work on InstructionCost (details)
  17. [AMDGPU] Move kill lowering to WQM pass and add live mask tracking (details)
  18. [flang][driver] Move standard macro predefs to a dedicated method (nfc) (details)
  19. [test][Dexter] Fix test failure if space in python path (details)
  20. [ARM] Change getScalarizationOverhead overload used in gather costs. NFC (details)
  21. Correct swift_bridge duplicate attribute warning logic (details)
  22. [Test] Add test that exposed failure on reverted patch in codegen (details)
  23. [gn build] Port b4993cf54d7f (details)
  24. Return "[Codegenprepare][X86] Use usub with overflow opt for IV increment" (details)
  25. [OpenCL] Fix missing const attributes for get_image_ builtins (details)
Commit 3b4f706ae16bb12b7d925fbf428def7cb2a6f7db by sander.desmalen
[AArch64][SVE] Asm: Fix supported immediates for DUP/CPY

This patch fixes an issue in the implementation of DUP/CPY where certain
immediates were not accepted. Immediates should be interpreted as a two's
complement encoding of a value that fits the number of bits of the element
type.

          mov z0.b, p0/z, #127
     <=>  mov z0.b, p0/z, #-129
     <=>  mov z0.b, p0/z, #0xffffffffffffff7f

This behaviour is in line with the GNU assembler.

Reviewed By: c-rhodes

Differential Revision: https://reviews.llvm.org/D94776
The file was modifiedllvm/test/MC/AArch64/SVE/cpy.s (diff)
The file was modifiedllvm/test/MC/AArch64/SVE/dup.s (diff)
The file was modifiedllvm/test/MC/AArch64/SVE/cpy-diagnostics.s (diff)
The file was modifiedllvm/test/MC/AArch64/SVE/dup-diagnostics.s (diff)
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/AArch64AddressingModes.h (diff)
The file was modifiedllvm/test/MC/AArch64/SVE/mov-diagnostics.s (diff)
The file was modifiedllvm/test/MC/AArch64/SVE/mov.s (diff)
Commit df1a17c219c073427f9d00eb042057bb3a4a3c64 by hokein.wu
[clang-check] Add tokens-dump in clang-check.

It is useful for syntax-tree developement.

Reviewed By: kbobyrev

Differential Revision: https://reviews.llvm.org/D96017
The file was modifiedclang/tools/clang-check/ClangCheck.cpp (diff)
Commit be9bbb57f4739e4653cee77979f6fb72310176c0 by sander.desmalen
[LoopVectorize] NFC: Change selectVectorizationFactor to work on ElementCount.

This patch is NFC and changes occurrences of `unsigned Width`
and `unsigned i` to work on type ElementCount instead.

This patch is a preparatory patch with the ultimate goal of making
`computeMaxVF()` return both a max fixed VF and a max scalable VF,
so that `selectVectorizationFactor()` can pick the most cost-effective
vectorization factor.

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D96019
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp (diff)
Commit 35a5e883906f11b63b60574d8737791448dd478f by hokein.wu
[Syntax] NFC, Simplify a test with annotations
The file was modifiedclang/unittests/Tooling/Syntax/BuildTreeTest.cpp (diff)
Commit e159a3ced4c54b539c165b1cc26424fa0b34d53e by hokein.wu
[Syntax] Remove a strict valid source location assertion for TypeLoc.

The EndLoc of a type loc can be invalid for broken code.

Also extend the existing test to support error code with `error-ok`
annotation.

Differential Revision: https://reviews.llvm.org/D96261
The file was modifiedclang/unittests/Tooling/Syntax/BuildTreeTest.cpp (diff)
The file was modifiedclang/lib/Tooling/Syntax/BuildTree.cpp (diff)
Commit 1db7b9ceaae43ab3c44ac96e238ec078538204ea by david.green
[ARM] Make a BE predicate bitcast consistent with the rest of llvm

We were storing predicate registers, such as a <8 x i1>, in the opposite
order to how the rest of llvm expects. This actually turns out to be
correct for the one place that usually uses it - the
ScalarizeMaskedMemIntrin pass, but only because the pass was incorrect
itself. This fixes the order so that bits are stored in the opposite
order and bitcasts work as expected. This allows the Scalarization pass
to be fixed, as in https://reviews.llvm.org/D94765.

Differential Revision: https://reviews.llvm.org/D94867
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-store.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-bitcast.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-ldst.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-loadstore.ll (diff)
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-load.ll (diff)
Commit 9498315c9ba35b41e6b82f33ca629482d6db72b9 by david.green
Expand masked mem intrinsics correctly wrt big-endian

Need to take endianness into account when doing vector to scalar casts
such as %bc = bitcast <8 x i1> %v to i8
Companion commit for https://reviews.llvm.org/D94867
Upload in response to
https://lists.llvm.org/pipermail/llvm-dev/2021-January/147862.html
Attempting to document the actual memory layout rules for vectors in
https://reviews.llvm.org/D94964

Differential Revision: https://reviews.llvm.org/D94765
The file was modifiedllvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp (diff)
The file was modifiedllvm/test/Transforms/ScalarizeMaskedMemIntrin/AArch64/expand-masked-load.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-ldst.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-load.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-store.ll (diff)
The file was modifiedllvm/test/Transforms/ScalarizeMaskedMemIntrin/AArch64/expand-masked-store.ll (diff)
Commit 33a58c1c5ced2daec879671e0d3efb3e2f021bbb by herhut
[mlir][gpu] Allow all dialects in SCF to GPU conversion.

With the standard dialect being split up, the set of dialects that are
used when converting to GPU is growing. This change modifies the
SCFToGpu pass to allow all operations inside launch bodies.

Differential Revision: https://reviews.llvm.org/D96480
The file was modifiedmlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp (diff)
Commit 703130fb016ac21b0a4537b0c8cf66ac15e8a7ac by sander.desmalen
[TTI] Change TargetTransformInfo::getMinimumVF to return ElementCount

This will be needed in the loop-vectorizer where the minimum VF
requested may be a scalable VF. getMinimumVF now takes an additional
operand 'IsScalableVF' that indicates whether a scalable VF is required.

Reviewed By: kparzysz, rampitec

Differential Revision: https://reviews.llvm.org/D96020
The file was modifiedllvm/lib/Target/Hexagon/HexagonTargetTransformInfo.h (diff)
The file was modifiedllvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp (diff)
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfoImpl.h (diff)
The file was modifiedllvm/lib/Analysis/TargetTransformInfo.cpp (diff)
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfo.h (diff)
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp (diff)
Commit 0b448854daffd57869254089ebb1bf69e8449823 by sven.vanhaastregt
[OpenCL] Add cl_khr_subgroup_extended_types to TableGen BIFs

Add the builtin functions brought by the
cl_khr_subgroup_extended_types extension to
`-fdeclare-opencl-builtins`.

Differential Revision: https://reviews.llvm.org/D96279
The file was modifiedclang/lib/Sema/OpenCLBuiltins.td (diff)
The file was modifiedclang/test/SemaOpenCL/fdeclare-opencl-builtins.cl (diff)
Commit a874d182c61c7f8e5291c718b40be0e133bf21f0 by Raphael Isemann
[DebugInfo] Prevent inlining in NRVO-string test cases

Since the new pass manager has been enabled by default these tests had their
-O1 variations failing due to the tested functions being inlined. This just
adds no_inline to the respective code similar to what we did in other
tests (e.g. aa56b30014d96700b2fc945be11866789f341d38 ).
The file was modifieddebuginfo-tests/llgdb-tests/nrvo-string.cpp (diff)
The file was modifieddebuginfo-tests/dexter-tests/nrvo-string.cpp (diff)
Commit 5c55d3747b0cab17aaa07729cf90a49dbda71bbe by sam.mccall
[CodeComplete] Member completion: heuristically resolve some dependent base exprs

Today, inside a template, you can get completion for:

Foo<T> t;
t.^

t has dependent type Foo<T>, and we use the primary template to find its members.
However we also want this to work:

t.foo.bar().^

The type of t.foo.bar() is DependentTy, so we attempt to resolve using similar
heuristics (e.g. primary template).

Differential Revision: https://reviews.llvm.org/D96376
The file was modifiedclang-tools-extra/clangd/unittests/CodeCompleteTests.cpp (diff)
The file was modifiedclang/lib/Sema/SemaCodeComplete.cpp (diff)
The file was modifiedclang/test/CodeCompletion/member-access.cpp (diff)
Commit 6c47eafb3973a8e3f7455c9655ed666883e7b513 by hokein.wu
[clang][index] report references from unreslovedLookupExpr.

Fix https://github.com/clangd/clangd/issues/675

Differential Revision: https://reviews.llvm.org/D96262
The file was modifiedclang/lib/Index/IndexBody.cpp (diff)
The file was modifiedclang/test/Index/Core/index-dependent-source.cpp (diff)
The file was modifiedclang-tools-extra/clangd/unittests/XRefsTests.cpp (diff)
Commit 7786ac8377a27f3e78bfb88bf59ebc489e26a5cd by david.green
[ARM] Remove dead mov's in preheader of tail predicated loops

With t2DoLoopDec we can be left with some extra MOV's in the preheaders
of tail predicated loops. This removes them, in the same way we remove
other dead variables.

Differential Revision: https://reviews.llvm.org/D91857
The file was modifiedllvm/lib/Target/ARM/ARMLowOverheadLoops.cpp (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-blockplacement.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/exitcount.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-vctpvpsel.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-postinc-lsr.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/mov-operand.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/while-loops.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-postinc-dct.ll (diff)
Commit 90081f3020e38727eb30506d052cbb4e3a489eb6 by mkazantsev
Revert "[Codegenprepare][X86] Use usub with overflow opt for IV increment"

This reverts commit 3d15b7e7dfc3e2cefc47791d1e8d95909e937842.

We've found an internal failure, need to analyze.
The file was modifiedllvm/test/CodeGen/X86/lsr-loop-exit-cond.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/2020_12_02_decrementing_loop.ll (diff)
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp (diff)
The file was modifiedllvm/test/CodeGen/X86/usub_inc_iv.ll (diff)
Commit 41500836b0f2e335b71919700e5db9341de76e8a by sander.desmalen
NFC: Migrate CodeMetrics to work on InstructionCost

This patch migrates cost values and arithmetic to work on InstructionCost.
When the interfaces to TargetTransformInfo are changed, any InstructionCost
state will propagate naturally.

See this patch for the introduction of the type: https://reviews.llvm.org/D91174
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D96030
The file was modifiedllvm/lib/Analysis/CodeMetrics.cpp (diff)
Commit c16f776028ddd39a4d5ea39d5c3831b1bcbb8c02 by carl.ritson
[AMDGPU] Move kill lowering to WQM pass and add live mask tracking

Move implementation of kill intrinsics to WQM pass. Add live lane
tracking by updating a stored exec mask when lanes are killed.
Use live lane tracking to enable early termination of shader
at any point in control flow.

Reviewed By: piotr

Differential Revision: https://reviews.llvm.org/D94746
The file was modifiedllvm/lib/Target/AMDGPU/SILowerControlFlow.cpp (diff)
The file was modifiedllvm/lib/Target/AMDGPU/SIInstructions.td (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_optimizations_pixelshader.ll (diff)
The file was removedllvm/test/CodeGen/AMDGPU/insert-skips-kill-uncond.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.kill.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/skip-if-dead.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/early-term.mir (diff)
The file was modifiedllvm/lib/Target/AMDGPU/SIInsertSkips.cpp (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.wqm.vote.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/vcmpx-exec-war-hazard.mir (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/transform-block-with-return-to-epilog.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/wqm.ll (diff)
The file was modifiedllvm/lib/Target/AMDGPU/SIOptimizeExecMasking.cpp (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/vcmpx-permlane-hazard.mir (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/wave32.ll (diff)
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp (diff)
Commit 0feff71eabd39fc93f3d9ec30ed16e26da6cf883 by andrzej.warzynski
[flang][driver] Move standard macro predefs to a dedicated method (nfc)

This patch just addresses one of the outstanding TODOs. More
specifically, it moves all the outstanding standard macro predefinitions
from `SetDefaultFortranOpts` to `setDefaultPredefinitions`. This
dedicated method for standard macro predefs was introduced in:
  * https://reviews.llvm.org/D96032
The file was modifiedflang/lib/Frontend/CompilerInvocation.cpp (diff)
Commit a31eae840525e9292a3a42c1fdac3fc594f42949 by james.henderson
[test][Dexter] Fix test failure if space in python path

The '%dexter_regression_test' substitution was missing quotes around the
python executable, unlike other substitutions of a similar nature in the
file. This changes fixes the issue.

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

Reviewed by: jmorse, aganea
The file was modifieddebuginfo-tests/lit.cfg.py (diff)
Commit e771614bae0a05585f720812d5936a0b81dcddf0 by david.green
[ARM] Change getScalarizationOverhead overload used in gather costs. NFC

This changes which of the getScalarizationOverhead overloads is used in
the gather/scatter cost to use the base variant directly, not relying on
the version using heuristics on the number of args with no args
provided. It should still produce the same costs for scalarized
gathers/scatters.
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp (diff)
Commit 81bc1365d8f85a125a6db6a5a1acff3ceddcbe9e by aaron
Correct swift_bridge duplicate attribute warning logic

The swift_bridge attribute warns when the attribute is applied multiple
times to the same declaration. However, it warns about the arguments
being different to the attribute without ever checking if the arguments
actually are different. If the arguments are different, diagnose,
otherwise silently accept the code. Either way, drop the duplicated
attribute.
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp (diff)
The file was modifiedclang/test/SemaObjC/attr-swift_bridge.m (diff)
Commit af1cccfa12c8d38a70593743402492e177583a26 by mkazantsev
[Test] Add test that exposed failure on reverted patch in codegen
The file was modifiedllvm/test/CodeGen/X86/usub_inc_iv.ll (diff)
Commit 78717f56ba4e777db02d80cb86db89282bd9bd8f by thakis
[gn build] Port b4993cf54d7f
The file was modifiedllvm/utils/gn/secondary/compiler-rt/lib/sanitizer_common/BUILD.gn (diff)
Commit 418c218efa950245ba075b9bb3a53505b807c5df by mkazantsev
Return "[Codegenprepare][X86] Use usub with overflow opt for IV increment"

The patch did not account for one corner case where cmp does not dominate
the loop latch. This patch adds this check, hopefully it's cheap because
the CFG does not change during the transform, so DT queries should be
executed quickly.

If you see compile time slowness from this, please revert.

Differential Revision: https://reviews.llvm.org/D96119
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp (diff)
The file was modifiedllvm/test/CodeGen/X86/2020_12_02_decrementing_loop.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/lsr-loop-exit-cond.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/usub_inc_iv.ll (diff)
Commit 3a29ac2a61f78aae049a46369203757ece315e23 by sven.vanhaastregt
[OpenCL] Fix missing const attributes for get_image_ builtins

Various get_image builtin function declarations did not have the const
attribute.  Bring the const attributes of `-fdeclare-opencl-builtins`
more in sync with `opencl-c.h`.
The file was modifiedclang/lib/Sema/OpenCLBuiltins.td (diff)