LLVM/project e1056bd — mlir/include/mlir/Analysis/DataFlow SparseAnalysis.h, mlir/lib/Analysis/DataFlow IntegerRangeAnalysis.cpp

[mlir][Dataflow] Revisit region arguments when operand change (#239658)

Alternative to https://github.com/llvm/llvm-project/pull/238782

`gpu.launch` body args weren't revisited after input dims lattice
changes.

* Add `GetLatticeFn` to sparse forward analysis
`visitNonControlFlowArguments`, obtaining lattice through it
automatically subscribe block on this lattice so it is revisited when
lattice change.
* Update `IntegerRangeAnalysis` and `IntegerDivisibilityAnalysis`.
* nonSuccessorInputs/nonSuccessorInputLattices may not match
successor.getSuccessor()->getArguments(), so compute index in
nonSuccessorInputs in `IntegerRangeAnalysis`.

Note to LLVM integration: 
`SparseForwardDataFlowAnalysis::visitNonControlFlowArguments` now takes
an additional `GetLatticeFn getLattice` parameter. Use

    [3 lines not shown]
DeltaFile
+54-0mlir/test/Analysis/DataFlow/integer-divisibility.mlir
+17-19mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp
+35-0mlir/test/Analysis/DataFlow/int-range-region-results.mlir
+24-10mlir/include/mlir/Analysis/DataFlow/SparseAnalysis.h
+33-0mlir/test/Dialect/GPU/int-range-interface.mlir
+26-0mlir/test/lib/Dialect/Test/TestOpDefs.cpp
+189-295 files not shown
+222-4611 files

LLVM/project 3ad61ff — clang/lib/CodeGen/TargetBuiltins AMDGPU.cpp, clang/test/CodeGen/AMDGPU ubsan-lane-builtins.c

[AMDGPU] Add UBSan checks for AMDGPU lane access builtins (#231485)

Summary:
First attempt to make some AMD specific behavior for UBSan checks. The
language manual states that using non-uniform values to readlane or
non-present indices to shuffling is undefined. There may be a few more
of these, but I thought this was low hanging fruit, hopefully
uncontroversial.
DeltaFile
+73-0compiler-rt/test/ubsan/AMDGPU/lanes.hip
+58-0clang/test/CodeGen/AMDGPU/ubsan-lane-builtins.c
+49-6clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
+37-0compiler-rt/test/Inputs/hip.h
+8-0compiler-rt/lib/ubsan/ubsan_handlers.cpp
+2-0compiler-rt/lib/ubsan/ubsan_handlers.h
+227-61 files not shown
+229-67 files

LLVM/project f172d13 — libc/src/__support/OSUtil/linux/syscall_wrappers rt_sigtimedwait.h, libc/src/signal/linux sigtimedwait.cpp sigwaitinfo.cpp

[libc] Implement sigtimedwait and sigwaitinfo in signal (#238787)

Add the standard POSIX function sigtimedwait and sigwaitinfo to
<signal.h>:

- Add low-level rt_sigtimedwait system call wrapper in
libc/src/__support/OSUtil/linux/syscall_wrappers/rt_sigtimedwait.h.
- Add public header declaration in libc/src/signal/sigtimedwait.h.
- Implement sigtimedwait entrypoint in
libc/src/signal/linux/sigtimedwait.cpp.
- Add public header declaration in libc/src/signal/sigwaitinfo.h.
- Implement sigwaitinfo entrypoint in
libc/src/signal/linux/sigwaitinfo.cpp using rt_sigtimedwait with a null
timeout.
- Declare sigtimedwait and sigwaitinfo in libc/include/signal.yaml.
- Register both entrypoints for Linux (x86_64, aarch64, riscv) in
architecture config files.
- Update CMakeLists.txt files across syscall wrappers, signal sources,
and tests.

    [6 lines not shown]
DeltaFile
+126-0libc/test/src/signal/sigtimedwait_test.cpp
+91-0libc/test/src/signal/sigwaitinfo_test.cpp
+54-0libc/src/__support/OSUtil/linux/syscall_wrappers/rt_sigtimedwait.h
+45-0libc/test/src/signal/CMakeLists.txt
+41-0libc/src/signal/linux/sigwaitinfo.cpp
+38-0libc/src/signal/linux/sigtimedwait.cpp
+395-010 files not shown
+538-016 files

LLVM/project 0549f57 — libc/src/__support/OSUtil/linux/syscall_wrappers clock_nanosleep.h, libc/src/time clock_nanosleep.h

[libc] Implement clock_nanosleep in time (#240025)

This PR implements standard POSIX `clock_nanosleep` in `<time.h>`.

- Adds `clock_nanosleep` entrypoint and internal Linux syscall wrapper.
- Returns error numbers directly without modifying `errno` per POSIX
specification.
- Registers public declaration in `libc/include/time.yaml`.
- Registers entrypoints across Linux targets (`x86_64`, `aarch64`,
`riscv`).
- Adds unit tests in `libc/test/src/time/clock_nanosleep_test.cpp`.

Fixes #240020.
DeltaFile
+67-0libc/test/src/time/clock_nanosleep_test.cpp
+53-0libc/src/__support/OSUtil/linux/syscall_wrappers/clock_nanosleep.h
+32-0libc/src/time/linux/clock_nanosleep.cpp
+28-0libc/src/time/clock_nanosleep.h
+16-0libc/test/src/time/CMakeLists.txt
+14-0libc/src/time/linux/CMakeLists.txt
+210-06 files not shown
+243-012 files

LLVM/project 767266d — llvm/test/CodeGen/SPIRV/debug-info debug-no-type-cycle-no-relaxed-extension.ll

Add new test.
DeltaFile
+28-0llvm/test/CodeGen/SPIRV/debug-info/debug-no-type-cycle-no-relaxed-extension.ll
+28-01 files

LLVM/project a379f84 — llvm/lib/TableGen TGParser.cpp, llvm/test/TableGen defm-dump-parent-class.td

[TableGen] Fix crash in AddParentClass for dump in multiclass (#238812)

Fixes #238799
DeltaFile
+40-0llvm/test/TableGen/defm-dump-parent-class.td
+1-1llvm/lib/TableGen/TGParser.cpp
+41-12 files

LLVM/project 46253a7 — flang/lib/Lower/OpenMP Clauses.cpp, flang/lib/Lower/Support ReductionProcessor.cpp

[flang][OpenMP] Iteration distance should be (+|-) some-expr (#239289)

Verify that the operator is actually either + or -. Simplify the
pre-lowering representation to have intrinsic operator directly instead
of having a defined-operator.

The actual verification of the operators is fairly simple. The bulk of
the changes is related to extracting `IntrinsicOperatorT` out of
`DefinedOperatorT` into a standalone type and using it in
`LoopIterationT::Distance`. The functions that converted AST clauses
into the lowering representation needed to be updated, as well as the
references to the nested enum values which are now members of a
different class.
DeltaFile
+38-36llvm/unittests/Frontend/OpenMPDecompositionTest.cpp
+25-16flang/lib/Lower/OpenMP/Clauses.cpp
+40-0flang/test/Semantics/OpenMP/doacross.f90
+14-15flang/lib/Lower/Support/ReductionProcessor.cpp
+17-0flang/test/Semantics/OpenMP/ordered03.f90
+10-4llvm/include/llvm/Frontend/OpenMP/ClauseT.h
+144-716 files not shown
+164-7712 files

LLVM/project c089977 — llvm/lib/Target/AMDGPU AMDGPUInstructionSelector.cpp, llvm/test/CodeGen/AMDGPU stacksave_stackrestore.ll

[AMDGPU][GISel] Fix stack pointer shift direction in selectStackRestore
DeltaFile
+28-28llvm/test/CodeGen/AMDGPU/stacksave_stackrestore.ll
+8-8llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-stacksave-stackrestore.mir
+4-4llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+40-403 files

LLVM/project f5ae04b — llvm/include/llvm/CodeGen SelectionDAG.h, llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp LegalizeTypes.cpp

[DAG] Replace getLibraryOptions helper with getSelectionDAGOptions (#240799)

Reduces compile time impact by avoiding most
DAG.getLibraryOptions().get<SelectionDAGOptions>() lookups
DeltaFile
+16-29llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+2-5llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
+3-3llvm/include/llvm/CodeGen/SelectionDAG.h
+2-0llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+23-374 files

LLVM/project 1d7b0b4 — offload/test/offloading atomic_fp_hints.c

fix formatting
DeltaFile
+2-1offload/test/offloading/atomic_fp_hints.c
+2-11 files

LLVM/project 040e24b — llvm/test/CodeGen/AMDGPU lrint.ll fp_to_uint.ll, llvm/test/CodeGen/AMDGPU/GlobalISel fptosi.bf16.ll

[DAGCombiner][GlobalISel] Fold floor into unsigned FP-to-int conversions (#239233)

Add shared SelectionDAG/GlobalISel combines to eliminate floors before
unsigned FP-to-int conversions.
* IR conversion is equivalent (reusing an existing comment):
https://github.com/llvm/llvm-project/pull/231060#issuecomment-6120567356
* Removing the floor is a refinement for `fptoui` and preserves the
result for `fptoui.sat`.
* Shared floors are allowed, following #231060. This can enable tail
calls but can also introduce spills when the floor is a libcall.
* `InstCombine` could have this pattern as well, but AMDGPU lowering
explicitly creates a floor with two users, so these combines are still
useful.

Updated existing codegen checks for:
* `f32 -> u32`, `f64 -> u32`, and `f16 -> u16`
* 64-bit results, saturation, and vectors
* source modifiers and the normal, true16, and fake16 variants


    [6 lines not shown]
DeltaFile
+292-291llvm/test/CodeGen/AMDGPU/bf16.ll
+129-128llvm/test/CodeGen/AMDGPU/GlobalISel/fptosi.bf16.ll
+7-238llvm/test/CodeGen/RISCV/half-round-conv.ll
+108-108llvm/test/CodeGen/AMDGPU/lround.ll
+105-109llvm/test/CodeGen/AMDGPU/fp_to_uint.ll
+99-99llvm/test/CodeGen/AMDGPU/lrint.ll
+740-97321 files not shown
+1,490-1,92427 files

LLVM/project 964ac05 — clang/lib/CodeGen CGStmtOpenMP.cpp, llvm/include/llvm/Frontend/OpenMP OMPConstants.h

implement feedback
DeltaFile
+66-0offload/test/offloading/atomic_fp_hints.c
+16-0llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
+2-8clang/lib/CodeGen/CGStmtOpenMP.cpp
+84-83 files

LLVM/project 3c094c8 — llvm/lib/Target/AMDGPU SIFoldOperands.cpp, llvm/test/CodeGen/AMDGPU select-identical-vector-lanes.ll fold-select-identical.mir

[AMDGPU] Fold S_CSELECT with identical sources in SIFoldOperands (#240525)

tryFoldCndMask already folds a V_CNDMASK whose two sources are the same 
register or the same immediate. Do the same for S_CSELECT_B32 and 
S_CSELECT_B64.

These selects arise when two vectors with matching lanes are built in 
one block and selected between in another, for example tensor 
descriptors built outside a loop. Isel sees only the cross-block vector 
registers, so it selects every lane, and only PeepholeOptimizer reveals 
that some lanes are the same value. Folding the select lets MachineLICM 
hoist the resulting move out of the loop.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+137-0llvm/test/CodeGen/AMDGPU/fold-select-identical.mir
+53-0llvm/test/CodeGen/AMDGPU/select-identical-vector-lanes.ll
+21-5llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
+211-53 files

LLVM/project eb461b1 — llvm/test/Transforms/LoopVectorize/AArch64 sve-inductions-unusual-types.ll transform-narrow-interleave-vscale-x-UF-step.ll

[LV][NFC] Regenerate more CHECK lines in tests (#240786)
DeltaFile
+463-414llvm/test/Transforms/LoopVectorize/AArch64/sve-interleaved-accesses.ll
+145-145llvm/test/Transforms/LoopVectorize/AArch64/store-costs-sve.ll
+87-78llvm/test/Transforms/LoopVectorize/AArch64/sve-vector-reverse.ll
+74-68llvm/test/Transforms/LoopVectorize/AArch64/sve-runtime-check-size-based-threshold.ll
+42-42llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-vscale-x-UF-step.ll
+40-40llvm/test/Transforms/LoopVectorize/AArch64/sve-inductions-unusual-types.ll
+851-7872 files not shown
+875-8118 files

LLVM/project 66c7474 — llvm/lib/Target/X86 X86ISelLowering.cpp X86InstrSSE.td, llvm/test/CodeGen/X86 bfloat-broadcast.ll

[X86] Fix bf16 VBROADCAST lowering and selection without AVX512BW+VLX

`bf16` vector shuffles are lowered as `vXi16` shuffles, and
`combineTargetShuffle` turns `VBROADCAST(bitcast(x))` into
`bitcast(VBROADCAST(x))` whenever `x` has a legal type. If `x` is an
un-bitcast `v8bf16` value (e.g. a register live across basic blocks, a
volatile load, or an AVX-NE-CONVERT conversion result), this creates a
`v8bf16` or `v16bf16` `X86ISD::VBROADCAST` (sources wider than 128 bits are
extracted down to `v8bf16`). If the source is a load whose other uses are
simplified away later, it becomes an `X86ISD::VBROADCAST_LOAD` instead. Both
only had isel patterns under `[HasBWI, HasVLX]`:

    LLVM ERROR: Cannot select: v8bf16 = X86ISD::VBROADCAST ...

This has been latent with AVX-NE-CONVERT (LLVM 18 already fails with
`-mcpu=sierraforest`). 93d242ed5416 (#230953) made `bf16` vectors legal with
AVX512BW, which exposed it without AVX512VL, and 3fdac7de5496 (#221225) made
`v8bf16` legal with AVX, so it now fails on every AVX2 target without
AVX512BW+VLX (e.g. `-mcpu=znver2`/`znver3`).

    [19 lines not shown]
DeltaFile
+86-39llvm/test/CodeGen/X86/bfloat-broadcast.ll
+11-0llvm/lib/Target/X86/X86InstrSSE.td
+7-2llvm/lib/Target/X86/X86ISelLowering.cpp
+104-413 files

LLVM/project a309740 — llvm/test/CodeGen/X86 bfloat-broadcast.ll

[X86] Add bf16 broadcast tests (NFC)

Add tests for `bf16` vector splats that end up as `X86ISD::VBROADCAST` or
`X86ISD::VBROADCAST_LOAD` of a `bf16` vector type:
- values live across basic blocks
- volatile loads
- loads whose other uses are simplified away after legalization
- broadcasts of `v8bf16` values that are bitcast to `vXi16`/`vXi32`

Only the default target (SSE2) and `-mattr=+avx512bw,+avx512vl` are tested
for now. AVX2 targets without AVX512BW+VLX crash on all of these: they fail
to select the `bf16` broadcast, or form an illegal `v16bf16` broadcast after
type legalization. The follow-up fix adds RUN lines for them.

Assisted-by: Antigravity
DeltaFile
+356-0llvm/test/CodeGen/X86/bfloat-broadcast.ll
+356-01 files

LLVM/project b09e3a0 — libc/include unistd.yaml, libc/src/unistd posix_close.h

[libc] Implement posix_close in unistd (#240024)

Implement the standard POSIX.1-2024 function `posix_close` in
`<unistd.h>`.

### Changes
- Added `posix_close` entrypoint in
`libc/src/unistd/linux/posix_close.cpp` which validates `flag` (`0` or
`POSIX_CLOSE_RESTART`) and delegates to `SYS_close`.
- Added `POSIX_CLOSE_RESTART` macro definition to `unistd-macros.h`.
- Registered entrypoint across Linux targets (`x86_64`, `aarch64`,
`arm`, `riscv`).
- Added unit tests in `libc/test/src/unistd/posix_close_test.cpp`.

Fixes #240019.
DeltaFile
+72-0libc/test/src/unistd/posix_close_test.cpp
+49-0libc/src/unistd/linux/posix_close.cpp
+25-0libc/src/unistd/posix_close.h
+17-0libc/test/src/unistd/CMakeLists.txt
+16-0libc/src/unistd/linux/CMakeLists.txt
+9-0libc/include/unistd.yaml
+188-07 files not shown
+206-013 files

LLVM/project af3c953 — llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/lib/Target/AArch64/GISel AArch64LegalizerInfo.cpp

[AArch64] CodeGen for seq_cst stores with rcpc3 (#239556)

When FEAT_LRCPC3 is present we can use STILP
instruction for seq_cst atomic stores as specified in
[ABI](https://github.com/ARM-software/abi-aa/blob/main/atomicsabi64/atomicsabi64.rst)
DeltaFile
+2-3llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+1-3llvm/test/CodeGen/AArch64/Atomics/aarch64_be-atomic-store-rcpc3.ll
+1-3llvm/test/CodeGen/AArch64/Atomics/aarch64-atomic-store-rcpc3.ll
+1-1llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
+5-104 files

LLVM/project f638882 — flang/lib/Lower Bridge.cpp OpenACC.cpp, flang/test/Lower/OpenACC acc-loop-seq-do-while.f90

[flang][OpenACC] Fix lowering crash on DO WHILE loop constructs

A loop construct associated with a DO WHILE crashed lowering: reading the
DO WHILE's loop control as bounds aborted, both when the DO WHILE is lowered
unstructured and, with -lower-do-while-to-scf-while, when it is lowered
structurally. A DO WHILE has no bounds and no induction variable, so lower
the construct to an acc.loop without bounds that holds the whole DO WHILE,
as for an unstructured loop, with nothing to privatize.
DeltaFile
+227-0flang/test/Lower/OpenACC/acc-loop-seq-do-while.f90
+13-6flang/lib/Lower/OpenACC.cpp
+10-2flang/lib/Lower/Bridge.cpp
+250-83 files

LLVM/project 5d66c6d — clang/lib/Sema SemaOpenMP.cpp, clang/test/OpenMP target_no_loop.cpp

Fix check for loop promotion to parallel for

A teams loop with calls to non API routines cannot be promoted to
parallel for. The visitor overrode such a case when there was a later
call to an API routine.
DeltaFile
+42-24clang/test/OpenMP/target_no_loop.cpp
+1-1clang/lib/Sema/SemaOpenMP.cpp
+43-252 files

LLVM/project 9927661 — llvm/lib/Target/AMDGPU AMDGPULegalizerInfo.cpp, llvm/test/CodeGen/AMDGPU stacksave_stackrestore.ll

[AMDGPU][GISel] Use the function stack pointer in legalizeStackSave
DeltaFile
+4-4llvm/test/CodeGen/AMDGPU/stacksave_stackrestore.ll
+4-2llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+8-62 files

LLVM/project 96f1f47 — llvm/include/llvm/Object WindowsMachineFlag.h, llvm/lib/Object WindowsMachineFlag.cpp

[llvm][Object] Handle unknown COFF machine types (#240047)

machineToStr() previously used llvm_unreachable() to handle unknown
machine types, which could cause a crash when an unsupported machine
type was encountered. This fix makes function return "unknown" instead,
when handling machine types not supported by this function

AI assisted with investigating the issue, discussing the testing
approach, and reviewing the implementation. I implemented the fix,
adapted existing LLVM tests to add regression coverage and ran the tests
locally
Related to #239535.
DeltaFile
+27-0llvm/unittests/Object/WindowsMachineFlagTest.cpp
+3-3llvm/include/llvm/Object/WindowsMachineFlag.h
+1-2llvm/lib/Object/WindowsMachineFlag.cpp
+1-0llvm/unittests/Object/CMakeLists.txt
+32-54 files

LLVM/project add1f8d — clang/include/clang/CIR/Dialect/IR CIROps.td, clang/test/CIR/CodeGenOpenMP non-openmp-code.cpp

[CIR] Return function pointer from `getCallableForCallee` (#237275)

Currently any indirect call will cause an assertion failure if openmp is
enabled together with CIR. This is because one of omp dialect-specific
passes (MarkDeclareTarget) will dyn_cast a pointer returned from
`getCallableForCallee`. The patch follows the same approach as FIR: if
there is no function, return first CallOp argument.
DeltaFile
+4-1clang/include/clang/CIR/Dialect/IR/CIROps.td
+3-0clang/test/CIR/CodeGenOpenMP/non-openmp-code.cpp
+7-12 files

LLVM/project 5986935 — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp

Rename variable.
DeltaFile
+6-6llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+2-2llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+8-82 files

LLVM/project b24a833 — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp

Minor cleanup.
DeltaFile
+2-2llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+2-2llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+4-42 files

LLVM/project 15b74e9 — llvm/lib/Target/SPIRV SPIRVAsmPrinter.cpp SPIRVNonSemanticDebugHandler.h

Fix stale comments.
DeltaFile
+10-9llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+2-2llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
+12-112 files

LLVM/project 3780583 — llvm/lib/Target/SPIRV SPIRVOptions.td

Update default value for flag.
DeltaFile
+1-1llvm/lib/Target/SPIRV/SPIRVOptions.td
+1-11 files

LLVM/project c5b5bef — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp, llvm/test/CodeGen/SPIRV/debug-info debug-typedef-base-debuginfonone.ll debug-type-composite-self-pointer-forward-refs.ll

[SPIRV] Declare SPV_KHR_relaxed_extended_instruction only when used

Whether one is needed is only known while building the module-scope NSDI,
which used to be streamed in sections 7 and 10, after OpExtension had been printed.

Split NSDI generation from output: generateModuleDebugInfo() now builds
the module-scope OpStrings and debug instructions into per-section
buffers before the module header is printed, and adds the extension if a
forward reference was built.

emitNonSemanticDebugStrings() and emitNonSemanticGlobalDebugInfo() output
the buffers in sections 7 and 10.

Function-body NSDI is still streamed.
With the extension no longer declared unconditionally.
DeltaFile
+62-34llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+49-32llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+5-6llvm/test/CodeGen/SPIRV/debug-info/debug-typedef-cycle-unsupported-forward-ref.ll
+6-5llvm/test/CodeGen/SPIRV/debug-info/debug-composite-parent-debuginfonone.ll
+4-4llvm/test/CodeGen/SPIRV/debug-info/debug-type-composite-self-pointer-forward-refs.ll
+3-4llvm/test/CodeGen/SPIRV/debug-info/debug-typedef-base-debuginfonone.ll
+129-851 files not shown
+133-857 files

LLVM/project 2f9e75d — llvm/lib/CodeGen ImplicitNullChecks.cpp, llvm/test/CodeGen/X86 implicit-null-check-pseudo-probe.ll implicit-null-check-pseudo-probe.mir

[CodeGen] Skip pseudo probes in the ImplicitNullChecks scan (#240239)

Implicit null checks (`-enable-implicit-null-checks`, used by frontends
that lower nil checks to a `SIGSEGV` handler) are silently disabled when
pseudo probes are enabled.

`PSEUDO_PROBE` is marked as having side effects so that it is not
dropped, so `canHandle()` rejects it and `analyzeBlockForNullChecks()`
gives up on the whole non-null successor. Probes start every
instrumented block, so `-fpseudo-probe-for-profiling` together with
`-enable-implicit-null-checks` loses the optimization for essentially
every candidate.

Skip debug instructions and pseudo probes while scanning the successor;
neither is the faulting operation nor counts against
`MaxInstsToConsider`. The probes stay in their block, and only the
faulting load is hoisted into the predecessor, so samples on that load
are attributed to the predecessor's probe.


    [17 lines not shown]
DeltaFile
+58-0llvm/test/CodeGen/X86/implicit-null-check-pseudo-probe.mir
+28-0llvm/test/CodeGen/X86/implicit-null-check-pseudo-probe.ll
+6-2llvm/lib/CodeGen/ImplicitNullChecks.cpp
+92-23 files

LLVM/project 38fe7d4 — llvm/test/CodeGen/X86 dpbusd.ll

[X86] Add test coverage for #240667 (#240794)
DeltaFile
+41-0llvm/test/CodeGen/X86/dpbusd.ll
+41-01 files