[CHR] Skip scopes with selects hoisted outside their region (#237922)
Encountered while building Clang with ThinLTO, PGO, and CSPGO. An outer
control-height-reduction scope can hoist a select used by its conditions
out of a nested scope. Processing the nested scope can then split a
block at an instruction that no longer belongs to it, or specialize the
hoisted select without the protection of the merged branch guarding the
nested scope. The invalid block split can loop indefinitely in builds
without assertions.
Reject a scope before transforming it if any of its selected
instructions has moved outside the scope. Checking every selected
instruction also prevents incorrect specialization when the cached
branch insertion point itself has not moved.
Add regressions for the invalid block split and for a function whose
return value incorrectly changes from true to false. Without the fix,
the tests reproduce the sentinel assertion and the wrong-code result
independently. All nine CHR tests pass with the fix.
[4 lines not shown]
NAS-145153 / 28.0.0-BETA.1 / Fail graceful VM and container stop when the guest keeps running (#20187)
## Problem
A graceful `vm.stop` / `container.stop` (no `force`, no
`force_after_timeout`, the API default) waited `shutdown_timeout` and
then reported SUCCESS even when the guest ignored the shutdown request
and was still running. The UI showed the guest as stopped and a graceful
container restart then failed on start with "already started". A
suspended VM was also left suspended with a successful job, even with
`force_after_timeout`, because the post-stop check only looked for
`RUNNING`.
## Solution
After the shutdown request, both stop paths check the state again. If
the guest has not stopped, it is powered off when `force_after_timeout`
is set; otherwise the job fails with an ETIMEDOUT `CallError` saying it
did not stop within the timeout. A suspended VM is resumed before the
shutdown request so the guest can act on it, and library errors (e.g.
stopping a guest that is not running) are raised as `CallError` like
start already does. The docstrings describe the new behaviour and the
container stop test now expects the graceful stop to fail.
[DAGCombiner] Do not fold selects of binops with more than two operands (#235585)
ADDE has a carry operand as its third operand and that is not handled in
foldSelectOfBinops(). Detected when building glibc for 32-bit SPARC.
Fixes the following error:
llc: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1066: const
llvm::SDValue& llvm::SDNode::getOperand(unsigned int) const: Assertion
`Num < NumOperands && "Invalid child # of SDNode!"' failed.
Assisted-by: Claude
[LangRef] Fix vp.merge expansion example (#241721)
After #241182 the effective mask is now a logical and instead of a
poison-propagating and, but we forgot to update this example.