X86: Use hasOneNonDBGUse instead of kill flag for cascaded select
The cascaded CMOV lowering requires the first select's result to only be
used by the second select. Avoid relying on the kill flag in preparation
for not setting it.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[X86] Fix TC_RETURN SDTypeProfile for the x32 ABI (#228281)
SDT_X86TCRET constrained the tail-call target operand with
SDTCisPtrTy<0>, which resolves to the data layout's 32-bit pointer type
on the x32 ABI. However the operand is actually i32 for direct calls to
GlobalAddress/ExternalSymbol or a zero extended i64 value otherwise.
Relax SDT_X86TCRET to SDTCisInt<0>, and update the two load-folding
patterns in X86InstrCompiler.td whose inferred type depended on the old
constraint to explicitly annotate i32/i64.
Add an X86-specific verifyTargetNode check for TC_RETURN/
TC_RETURN_GLOBALADDR that reinstates the precise expected width: i32 for
a direct call to a GlobalAddress/ExternalSymbol under the x32 ABI (and
in plain 32-bit mode), i64 for the same under LP64, and otherwise i64
iff the subtarget runs in 64-bit mode (including x32) or i32 otherwise.
Co-authored-by: Claude Sonnet 5.5 <noreply at anthropic.com>
Co-authored-by: Sergei Barannikov <barannikov88 at gmail.com>
[sanitizer] Clear pending dlerror on thread exit before unregistering
Starting with glibc 2.34, failed dlfcn calls store a per-thread error
struct in TLS (__libc_dlerror_result) instead of a pthread_key_t, and
free it in __libc_thread_freeres() after all pthread TSD destructors
have completed.
Because ASan, LSan, and HWASan unregister the exiting thread in their
pthread TSD destructors during __nptl_deallocate_tsd(), LSan stops
scanning that thread's TLS before __libc_thread_freeres() frees
__libc_dlerror_result. If a leak check runs in that window (for example,
when the main thread exits while a detached worker thread is finishing)
and libc debug symbols are not installed to match the default *dlerror*
suppression on _dlerror_run, LSan reports a false positive leak from
dlsym/dlopen.
This manifests as flaky LSan leaks on `LLVM :: ExecutionEngine/JITLink/x86-64/`
tests on `sanitizer-*-linux-bootstrap-asan` and `sanitizer-x86_64-linux-fast`
buildbots, exposed after re-enabling `ExecutionEngine` tests under ASan in
[10 lines not shown]
[CodeGenPrepare] Prefix option names with cgp- (#228838)
Rename the CodeGenPrepare options so that they start with cgp-, and turn
the -disable-* options into positive options that default to true:
The section prefix options (-profile-guided-section-prefix, etc.) are
kept for now.
Aided by Opus 5.5
clnt_vc.c: Fix handling of backchannel xprt
When clnt_vc_destroy() is called, it might not be the
current connection. Without this patch, if it is not
the current connection, xp_p2 is set NULL and xprt is released
when it should not be released.
This patch adds a check for "current connection" to fix
the problem. Found during testing to the client RDMA code,
but could happen for TCP as well.
MFC after: 1 week