AbortedChanges

Summary

  1. [InstCombine][X86] Covert masked load/stores with (sign extended) bool vector masks to generic intrinsics. (details)
  2. TableGen: change a couple of member names to clarify their use. (details)
  3. [LV][ARM] Add preferInloopReduction target hook. (details)
  4. [DSE] Precommit test case with loop carried dependence. (details)
  5. [DSE] Bail out on MemoryPhis when deleting stores at end of function. (details)
  6. [DSE] Adjust coroutines test after e082dee2b588. (details)
  7. [SelectionDAG][X86][ARM][AArch64] Add ISD opcode for __builtin_parity. Expand it to shifts and xors. (details)
  8. [MinGW] Use lib prefix for libraries (details)
  9. [MinGW][clang-shlib] Build by default on MinGW (details)
  10. [MinGW][libclang] Allow simultaneous shared and static lib (details)
  11. [InstCombine] Add extra use tests for abs canonicalization (NFC) (details)
  12. [gcov] Clean up by getting llvm.dbg.cu earlier (details)
  13. [gcov] emitProfileArcs: iterate over GCOVFunction's instead of Function's to avoid duplicated filtering (details)
  14. Revert "[gcov] emitProfileArcs: iterate over GCOVFunction's instead of Function's to avoid duplicated filtering" (details)
Commit 3170d54842655d6d936aae32b7d0bc92fce7f22e by llvm-dev
[InstCombine][X86] Covert masked load/stores with (sign extended) bool vector masks to generic intrinsics.

As detailed on PR11210, if the mask is known to come from a (sign extended) bool vector (e.g. comparisons) then we can represent with a generic masked load/store without losing anything.

We already do something similar for BLENDV -> SELECT conversion.
The file was modifiedllvm/test/Transforms/InstCombine/X86/x86-masked-memops.ll
The file was modifiedllvm/lib/Target/X86/X86InstCombineIntrinsic.cpp
Commit 8ce75e2778daf0492421fb524986756ef7e84b2b by paul
TableGen: change a couple of member names to clarify their use.
The file was modifiedllvm/include/llvm/TableGen/Record.h
The file was modifiedllvm/lib/TableGen/Record.cpp
Commit 74760bb00fb9b78a2fe12242716bd6976b8c3566 by david.green
[LV][ARM] Add preferInloopReduction target hook.

This allows the backend to tell the vectorizer to produce inloop
reductions through a TTI hook.

For the moment on ARM under MVE this means allowing integer add
reductions of the correct size. In the future this can include integer
min/max too, under -Os.

Differential Revision: https://reviews.llvm.org/D75512
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/mve-reduction-types.ll
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfoImpl.h
The file was modifiedllvm/lib/Analysis/TargetTransformInfo.cpp
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfo.h
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.h
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Commit 3de9e3e493baed93e1aa0e99b04a0b11f370a939 by flo
[DSE] Precommit test case with loop carried dependence.
The file was addedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-loop-carried-dependence.ll
Commit e082dee2b5885bba65e20b22b088bcaca5546984 by flo
[DSE] Bail out on MemoryPhis when deleting stores at end of function.

When deleting stores at the end of a function, we have to do PHI
translation, otherwise we might miss reads in different iterations of a
loop. See multiblock-loop-carried-dependence.ll for details.

This fixes a mis-compile and surprisingly also increases the number of
eliminated stores from 26047 to 26572 for MultiSource/SPEC2000/SPEC2006
on X86 with -O3 -flto. This is most likely because we save budget by not
exploring through MemoryPhis, which are less likely to result in valid
candidates for elimination.

The issue was reported post-commit for fb109c42d91c.
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-memintrinsics.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-loop-carried-dependence.ll
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-malloc-free.ll
Commit d85ac6d577ac5d4a7812e6cd3b0171f5e356c805 by flo
[DSE] Adjust coroutines test after e082dee2b588.
The file was modifiedllvm/test/Transforms/Coroutines/ArgAddr.ll
Commit ad3d6f993d9f7ff3a54c5a716ccc918026fa0252 by craig.topper
[SelectionDAG][X86][ARM][AArch64] Add ISD opcode for __builtin_parity. Expand it to shifts and xors.

Clang emits (and (ctpop X), 1) for __builtin_parity. If ctpop
isn't natively supported by the target, this leads to poor codegen
due to the expansion of ctpop being more complex than what is needed
for parity.

This adds a DAG combine to convert the pattern to ISD::PARITY
before operation legalization. Type legalization is updated
to handled Expanding and Promoting this operation. If after type
legalization, CTPOP is supported for this type, LegalizeDAG will
turn it back into CTPOP+AND. Otherwise LegalizeDAG will emit a
series of shifts and xors followed by an AND with 1.

I've avoided vectors in this patch to avoid more legalization
complexity for this patch.

X86 previously had a custom DAG combiner for this. This is now
moved to Custom lowering for the new opcode. There is a minor
regression in vector-reduce-xor-bool.ll, but a follow up patch
can easily fix that.

Fixes PR47433

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D87209
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was addedllvm/test/CodeGen/ARM/parity.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
The file was addedllvm/test/CodeGen/AArch64/parity.ll
The file was modifiedllvm/test/CodeGen/X86/parity.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-xor-bool.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
The file was modifiedllvm/lib/CodeGen/TargetLoweringBase.cpp
The file was modifiedllvm/include/llvm/CodeGen/ISDOpcodes.h
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit cc76965b19085519278bff1052059e03769b71e8 by martin
[MinGW] Use lib prefix for libraries

In MinGW world, UNIX like lib prefix is preferred for the libraries.
This patch adjusts CMake files to do that.

Differential Revision: https://reviews.llvm.org/D87517
The file was modifiedlldb/source/API/CMakeLists.txt
The file was modifiedclang/tools/libclang/CMakeLists.txt
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
The file was modifiedllvm/tools/llvm-config/llvm-config.cpp
Commit bb613044b6800b8ccc238232677f905bda423819 by martin
[MinGW][clang-shlib] Build by default on MinGW

It builds without errors and makes possible to use
CLANG_LINK_CLANG_DYLIB=1.

Differential Revision: https://reviews.llvm.org/D87547
The file was modifiedclang/tools/CMakeLists.txt
Commit 7da941939902768af25ffa45149695a0a5f15951 by martin
[MinGW][libclang] Allow simultaneous shared and static lib

It builds fine for MinGW on Windows.

Differential Revision: https://reviews.llvm.org/D87539
The file was modifiedclang/tools/libclang/CMakeLists.txt
Commit c34a99fe589b870354c9a7863b79d882c74f7d50 by nikita.ppv
[InstCombine] Add extra use tests for abs canonicalization (NFC)
The file was modifiedllvm/test/Transforms/InstCombine/abs-1.ll
Commit c55c14837e148b817de989106560328219df342b by i
[gcov] Clean up by getting llvm.dbg.cu earlier
The file was modifiedllvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
Commit 412c9c0bf2a8ccbda2d925575891a51ef5df846e by i
[gcov] emitProfileArcs: iterate over GCOVFunction's instead of Function's to avoid duplicated filtering
The file was modifiedllvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
Commit 7d3825ed954aa1578790b96a8a544d034ea112f6 by i
Revert "[gcov] emitProfileArcs: iterate over GCOVFunction's instead of Function's to avoid duplicated filtering"

This reverts commit 412c9c0bf2a8ccbda2d925575891a51ef5df846e.
The file was modifiedllvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp