freebsd-base.7: Fix stray -r
Remote stray "-r" from the example of installing a toolchain
to alternate root.
Reviewed by: ivy
Differential Revision: https://reviews.freebsd.org/D54611
[InstCombine] Guard foldICmpSRemConstant against zero divisors (#173702)
instcombine can create srem X, 0 or icmp ult X, 0 mid-pass when
operands fold to zero, which trips assertions in foldICmpSRemConstant.
Bail out on zero divisors / zero ULT constants instead of asserting,
and add a regression test from the minimized reproducer.
This was found by a fuzzer I'm working on. The high-level design is to
randomly generate LLVM IR, run a pass on it, and then run the original
and new IR through the interpreter. They should produce the same
results. Right now I'm only fuzzing instcombine.
[Instcombine] Fix crash in foldMinimumMaximumSharedOp (#173705)
We were missing a check that the inner intrinsic is in fact a min/max
op. We'd crash if it was any other intrinsic!
This was found by a fuzzer I'm working on. The high-level design is to
randomly generate LLVM IR, run a pass on it, and then run the original
and new IR through the interpreter. They should produce the same
results. Right now I'm only fuzzing instcombine.
[Instcombine] Fix infinite loop in visitSelectInst (#173704)
Doing a nop replaceOperand leads us into an infinite loop here.
This was found by a fuzzer I'm working on. The high-level design is to
randomly generate LLVM IR, run a pass on it, and then run the original
and new IR through the interpreter. They should produce the same
results. Right now I'm only fuzzing instcombine.
[Instcombine] Ensure simplifyValueKnownNonZero adds instrs in dominance order (#173703)
This was found by a fuzzer I'm working on. The high-level design is to
randomly generate LLVM IR, run a pass on it, and then run the original
and new IR through the interpreter. They should produce the same
results. Right now I'm only fuzzing instcombine.
[AArch64] Optimize ANDS(CSET, CSET) to CCMP. (#174919)
We have existing optimizations for and(cset, cset) and or(cset, cset),
converting them to more optimal ccmp chains. This makes use of the same
optimization for ANDS instructions that do not require the result of the
AND (i.e. TSTs). We generate a cmp from a cset, for the flags produced
by the ANDS. This will then be optimised away in many cases, leaving the
ccmp and use of the flags.
[AMDGPU] Add liverange split instructions into BB Prolog
The COPY inserted for liverange split during sgpr-regalloc
pipeline currently breaks the BB prolog during the subsequent
vgpr-regalloc phase while spilling and/or splitting the vector
liveranges. This patch fixes it by correctly including the
the LR split instructions during sgpr-regalloc and wwm-regalloc
pipelines into the BB prolog.
[CodeGen] Introduce MI flag for Live Range split instructions
For some targets, it is required to identify the COPY instruction
corresponds to the RA inserted live range split. Adding the new
flag `MachineInstr::LRSplit` to serve the purpose.
[NEW PORT] security/py-k5test: Library for setting up self-contained Kerberos 5 environments
Co-authored-by: Michael Osipov <michaelo at FreeBSD.org>
PR: 278820
[Clang] Let isAnyArgInstantiationDependent handle Null template arguments (#174698)
Unused template parameters, though never referenced during substitution,
must remain in the MLTAL to preserve consistent template parameter
indices.
The null type placeholder plays this role, while
isAnyArgInstantiationDependent() doesn't properly handle this case when
checking nested constraints.
There is no release note because this is a regression from concept
parameter mapping.
Fixes https://github.com/llvm/llvm-project/issues/174667
[libc++] Correct `optional<T&>` implementation (#174537)
Resolves #174350
- Several issues were found in the current implementation of
`optional<T&>`
- `value()`, `operator*()`, `and_then()`, `transform()`, `operator->()`
still provided their ref-qualified versions for rvalues and `const&`.
- Using the listed methods on an rvalue `optional<T&>` would cause a
compile failure due to a mismatch in return types.
- On the latter, `operator*`, `operator->` would return `const` for a
`optional<T&>`, which is an incorrect deep const.
- A few constructors were missing (`optional<U>&`), and most
constructors relevant to `optional<T&>` were missing `noexcept`
- Constructors and `emplace` were not correctly constructing a `T&` as
specified in _`convert-ref-init-val`_
- Also corrects the behavior of `value_or` which should return
`remove_cv_t<T>` (in our case `decay_t<_Tp>`)
- Add several test cases to verify behavior, update `value_or` tests