InstCombine: Rudimentary support of shufflevector in SimplifyDemandedFPClass
This should look more like the computeKnownFPClass handling, with knowledge
of demanded vector elements.
InstCombine: Fix defining undef constant vector elts in SimplifyDemandedFPClass
Fold constants of known single class to the original constant instead of
a new constant. This avoids overdefining vector elements that were originally
undefined with the splat constant.
[mlir][Interfaces][NFC] Add `RegionBranchOpInterface` helper for forwarded values (#173981)
Add a helper function to compute a mapping of successor operands to
successor inputs. This mapping is computed in various places. Also add a
helper function to gather all region branch points.
This commit is in preparation of a bug fix / partial redesign of
`-remove-dead-values`. This commit also removes some duplicate code in
various places.
[VPlan] Handle addrspacecast/ptrtoaddr in VPlan-based cost model.
Also handle missing PtrToAddrs and AddrSpaceCast in
getCostForRecipeWithOpcode.
This makes sure all cast opcodes are handled, fixing a crash on loops
replicating addrspacecast and ptrtoaddrs.
InstCombine: Fix another wrong interested mask computeKnownFPClass call (#174135)
Follow up from c436551d5283a8fc00ae880a5b76660b6f08e37b, this is another
instance of the same problem.
[clang-tidy] Rename google-build-namespaces to misc-anonymous-namespace-in-header (#173484)
This PR renames the check `google-build-namespaces` to
`misc-anonymous-namespace-in-header` and adds documentation on why
anonymous namespaces in headers are problematic.
Closes #170979
InstCombine: Fix another wrong interested mask computeKnownFPClass call
Follow up from c436551d5283a8fc00ae880a5b76660b6f08e37b, this is another
instance of the same problem.
[mlir][linalg] Reject unsigned pooling on non-integer element types (#166070)
Fixes: #164800
Ensures unsigned pooling ops in Linalg stay in the integer domain: the
lowering now rejects floating/bool inputs with a clear diagnostic, new
regression tests lock in both the error path and a valid integer
example, and transform decompositions are updated to reflect the integer
typing.
Signed-off-by: Akimasa Watanuki <mencotton0410 at gmail.com>
[NPM] Update OptimizedRegAlloc and MachineLateOptimization pipelines (#172795)
1. add the StackSlotColoringPass to default pipeline
2. Introduce MachineLateInstrsCleanupPass at the beginning of
addMachineLateOptimization (matches the legacy default pipeline)
[ProfCheck] Exclude test from e4722c6
This adds in a select that we should probably just mark with unknown
profdata. Exclude for now to get the bot back to green.
[LLVMABI] Implement the ABI Typesystem (#158329)
This PR implements the first part of the LLVM ABI lowering library,
proposed in [this
RFC](https://discourse.llvm.org/t/rfc-an-abi-lowering-library-for-llvm/84495).
It is split out of https://github.com/llvm/llvm-project/pull/140112,
which demonstrates how this is going to be used.
The ABI type system is intended to represent all the type information
that is necessary to make call lowering decisions. As such, it contains
less information than Clang QualTypes, but more information than LLVM IR
types. The current type system has enough information to implement the
x86_64 SysV ABI, but some extensions will likely be needed in the future
for other targets (e.g. unadjusted alignment).
The type system expects layout information (like size, offset and
alignment) to already be computed by the frontend.
The types are constructed using TypeBuilder, which uses a
BumpPtrAllocator. The types themselves are not uniqued -- instead we
cache the QualType -> ABI type translation (in future patches).
ValueTracking: Improve handling of fadd in computeKnownFPClass.
This already recognized that if both inputs are positive, the
result is positive. Extend this to the mirror situation with
negative inputs.
Also special case fadd x, x. Canonically, fmul x, 2 is fadd x, x.
We can tell the sign bit won't change, and 0 will propagate.
ValueTracking: Add more baseline tests for computeKnownPPClass of fadd
Test cases with fadd x, x. Also test cases where both inputs are known
negative.