1. [PowerPC] Add tests for `select` patterns. NFC. (details)
  2. [SVE] Replace / operator in TypeSize/ElementCount with divideCoefficientBy (details)
  3. [Coroutines] Reuse storage for local variables with non-overlapping lifetimes (details)
Commit dd3ba72066800361145431b3c6a92011bd7a62be by lkail
[PowerPC] Add tests for `select` patterns. NFC.
The file was addedllvm/test/CodeGen/PowerPC/select.ll
Commit bafdd11326a46421b68f68c794fd189c77a32e15 by david.sherwood
[SVE] Replace / operator in TypeSize/ElementCount with divideCoefficientBy

After some recent upstream discussion we decided that it was best
to avoid having the / operator for both ElementCount and TypeSize,
since this could give the impression that these classes can be used
in the same way as basic integer integer types. However, division
for scalable types is a bit odd because we are only dividing the
minimum quantity by a value, as opposed to something like:

  (MinSize * Vscale) / SomeValue

This is why when performing division it's important the caller
first establishes whether the operation makes sense, perhaps by
calling isKnownMultipleOf() prior to division. The caller must now
explictly call divideCoefficientBy() on the class to perform the

Differential Revision:
The file was modifiedllvm/unittests/IR/VectorTypesTest.cpp
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedllvm/include/llvm/IR/DerivedTypes.h
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
The file was modifiedllvm/lib/CodeGen/TargetLoweringBase.cpp
The file was modifiedllvm/unittests/CodeGen/ScalableVectorMVTsTest.cpp
The file was modifiedllvm/include/llvm/Support/MachineValueType.h
The file was modifiedllvm/include/llvm/CodeGen/ValueTypes.h
The file was modifiedllvm/include/llvm/Support/TypeSize.h
Commit b3a722e66b75328ab5e2eb5c8572022cb083855b by yedeng.yd
[Coroutines] Reuse storage for local variables with non-overlapping lifetimes

bug 45566 shows the process of building coroutine frame won't consider
that the lifetimes of different local variables are not overlapped,
which means the compiler could generates smaller frame.

This patch calculate the lifetime range of each alloca by StackLifetime
class. Then the patch build non-overlapped sets for allocas whose
lifetime ranges are not overlapped. We use the largest type in a
non-overlapped set as the field type in the frame. In insertSpills
process, if we find the type of field is not the same with the alloca,
we cast the pointer to the field type to the pointer to the alloca type.
Since the lifetime range of alloca in one non-overlapped set is not
overlapped with each other, it should be ok to reuse the storage space
in the frame.

Test plan: check-llvm, check-clang, cppcoro, folly

Reviewers: junparser, lxfind, modocache

Differential Revision:
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/lib/Transforms/Coroutines/CoroInternal.h
The file was modifiedllvm/lib/Transforms/Coroutines/Coroutines.cpp
The file was modifiedllvm/lib/Transforms/Coroutines/CoroSplit.cpp
The file was modifiedllvm/lib/Transforms/Coroutines/CMakeLists.txt
The file was addedllvm/test/Transforms/Coroutines/coro-frame-reuse-alloca-02.ll
The file was modifiedllvm/include/llvm/Transforms/Coroutines/CoroSplit.h
The file was addedllvm/test/Transforms/Coroutines/coro-frame-reuse-alloca-00.ll
The file was modifiedllvm/lib/Transforms/Coroutines/CoroFrame.cpp
The file was modifiedllvm/include/llvm/Transforms/Coroutines.h
The file was addedllvm/test/Transforms/Coroutines/coro-frame-reuse-alloca-01.ll
The file was addedllvm/test/Transforms/Coroutines/coro-frame-reuse-alloca-03.ll