[LV] Simplify extract-lane with scalar operand to the scalar value itself. (#174534)
This patch simplifies extract-lane(%lane_num, %X) to %X when %X is a
scalar value. Extracting from a scalar is redundant since there is only
one value to extract.
[libclc] Remove llvm-link --override flag and make implementation self-contained (#175134)
Revert --override flag added in 28d9255aa7c0 and avoid defining the same
symbol across multiple files of a target, simplifying the build and
easing the transition to CMake add_library for libclc.
amdgcn ldexp now uses __builtin_elementwise_ldexp.
No functional changes to clc_sqrt or clc_rsqrt.
Reapply "[ORC] Add utilities for limited symbolication of JIT backtra… (#175469)
…ces"
This reapplies 906b48616c03948a4df62a5a144f7108f3c455e8, which was
reverted in c11df52f9b847170b766fb71defd2a9222d95a8d due to bot
failures.
The testcase has been dropped from this recommit as it failed on several
bots (possbly due to differing backtrace formats or failure modes). I'll
re-introduce the testcase in a follow-up commit so that it cane be
iterated on (and re-reverted if necessary) without affecting the options
introduced by this commit. (Since these options are best-effort
debugging tools it's ok if they live in-tree without a test for now).
[RISCV] Add support for QC.E.LI in RISCVMergeBaseOffset (#175310)
When we have `Xqcili` enabled and it is the `small code model`, we use
the `QC.E.LI` instruction to materialize addresses. Add support for
`QC.E.LI` in the `RISCVMergeBaseOffset` pass to merge the offset of the
address calculation into the offset field in a global address lowering
sequence.
[ORC] Fixed incorrect additional header dirs (#175193)
The CMake ADDITIONAL_HEADER_DIRS directive for two Orc libraries,
specifically Shared and TargetProcess, used incorrect values that
pointed to its parent library include directory instead of its own. This
is now fixed.
[InstCombine][profcheck] Add unknown branch weights to selects created in InstCombineAndOrXor.cpp (#175269)
These select instructions were created from combinations of bitwise
operators which have no branch weight information.
Tracking issue: #147390
[VPlan] Add missing sext(sub) SCEV fold to getSCEVExprForVPValue.
SCEV has a manual fold when doing SCEV construction from IR, that is not
integrated in the regular SCEV construction functions. Mirror the
behavior in getSCEVExprForVPValue, to match results when constructing
SCEVs from IR.
Fixes https://github.com/llvm/llvm-project/issues/174622.
ValueTracking: Fix handling of fadd with mixed denormal modes
Fix case where the input mode is IEEE, the output flushes, and the
input could be subnormal. Also improves accuracy with positive zero
case.
[X86][NewPM] Port x86-fixup-bw-insts to NPM (#175399)
Similar to other pass portings. Refactor into an implementation class,
rename the old pass, and add a wrapper around the implementation for the
new pass manager. Handle PSI/MBFI similar to other backend passes.
InstCombine: Add more tests for min/max SimplifyDemandedFPClass
Test some more refined cases, such as ordering with 0s and within
known positive and known negative cases.
ADT: Add utility functions for comparing FPClassTest
Add utility functions for checking if less and greater queries
are known to not evaluate to true. This will permit more precise
folding of min/max intrinsics. The test is kind of a mess.
InstCombine: Improve SimplifyDemandedFPClass min/max handling
Refine handling of minimum/maximum and minimumnum/maximumnum. The
previous folds to input were based on sign bit checks. This was too
conservative with 0s. This can now consider -0 as less than or equal
to +0 as appropriate, account for nsz. It additionally can handle
cases like one half is known positive normal and the other subnormal.
[SystemZ] Remove the `softPromoteHalfType` override (#175410)
`softPromoteHalfType` is being phased out because it is prone to
miscompilations (further context at [1]). SystemZ is one of the few
remaining platforms to override the default, so remove it here.
This only affects SystemZ when the `soft-float` option is used.
[1]: https://github.com/llvm/llvm-project/pull/175149