[LV] Add iv_outside_user ptr-ind variant test (#213263)
There was previously a doubt about whether the integer variant of the
test should use wrap-flags on the latch exit value, which motivates us
to add coverage for the ptr variant.
[Driver][Hurd] Remove llvm_unreachable (#171077)
Remove the llvm_unreachable from getDynamicLinker(). The code path is
reachable. In the case of an unsupported architecture we're not worrying
about trying to actually determine the dynamic linker, and I don't think
it makes sense for the Driver to crash.
Pointed out by bug report #64194
---------
Co-authored-by: Shivam Gupta <shivam98.tkg at gmail.com>
[Transforms][Utils] Add LoopSplitUtils for iteration-space loop splitting (#205995)
Introduce LoopSplitUtils, a utility that splits a counted loop into a
chain of per-partition sub-loops covering contiguous slices of the
original iteration space. Given a loop and a list of partition ranges,
it clones the body per partition, guards each with an entry check that
skips empty partitions, clamps each latch to its slice, and rebuilds SSA
for loop-carried and live-out values so the result is
behaviour-preserving.
Key properties:
- Supports ascending (+1) and descending (-1) unit-step inductions, in
both signed and unsigned iteration orderings, with direction-aware
guard/latch predicates and end clamps.
- Reuses the original loop for partition 0 and clones the rest, exposing
per-partition value maps via getPartitionValue()/getPartitionValueMap().
- Lets callers drop the entry guard for a partition proven non-empty via
avoidPartitionGuard(); provably-empty partitions are always skipped.
- Patches the dominator tree and LoopInfo incrementally rather than
[18 lines not shown]
[clang-tidy] ignore uninitialized std::array in member init (#98134)
cppcoreguidelines-pro-type-member-init check has an option IgnoreArrays
for ignoring uninitialized C arrays. This patch adds support for C++
std::array as well.
Co-authored-by: David Siroky <david at siroky.cz>
[lldb] Skip flaky test_circular_dependency_evaluate_expression_in_get_frame (#213610)
This provider's identity-forwarding pattern intermittently hits a known
frame-identity-aliasing bug in ScriptedFrameProvider::GetFrameAtIndex,
tracked in https://github.com/llvm/llvm-project/pull/208992.
[clang][ast][objc] Implement getNameForDiagnostic for ObjC{Method,Property}Decl (#213030)
This overrides `getNameForDiagnostic` to provide a qualified name
representation for Objective-C methods and properties in diagnostics.
When qualified is true, it formats them using the standard Objective-C
syntax, such as `-[Class selector]` or `+[Class property]`. Previously
these would be `Class::selector` or `Class::property`. If qualified is
false, it falls back to printName.
Note that I avoided modifying `NamedDecl::getQualifiedNameAsString()` or
`printQualifiedName()` which will continue to (unfortunately) return
`Class::method`, but this is intentional to attempt to avoid any
breakage downstream due to output changing.
X86: Defend against regression from SimplifyDemandedVectorElts load support
It doesn't appear possible to test this independently.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
clang/AMDGPU: Add half typed image gather4 builtin
Follow along with the precedent of using an f32 suffix
for the coordinate type. We probably should have had one
builtin that detected the coordinate type.
Co-Authored-By: Claude (Opus 4.8) <noreply at anthropic.com>
clang/AMDGPU: Require 16-bit-insts for half typed image sample builtins
Extend the d16 feature requirement to the half typed image sample
builtins. The sample variants returning 16-bit elements require d16 support
(gfx8+) but were gated only on image-insts/extended-image-insts, so they were
wrongly accepted on old targets.
Co-Authored-By: Claude (Opus 4.8) <noreply at anthropic.com>
clang/AMDGPU: Require 16-bit-insts for half typed image builtins
Typed image load/store operations with 16-bit elements require d16
support which was introduced in gfx8. They were previously gated only
on image-insts, so they were wrongly accepted on targets that have
images but lack 16-bit support (e.g. gfx700), where the backend then
fails to select.
Co-Authored-By: Claude (Opus 4.8) <noreply at anthropic.com>
clang/AMDGPU: Require 16-bit-insts for half typed buffer format builtins
Typed buffer format load/store operations with 16-bit elements require
d16 support which was introduced in gfx8. These builtins previously had
no required features at all, so they were accepted (and then crashed the
backend) on targets without 16-bit support.
Diagnose these in Sema, parallel to the image builtins. The manual
verification here suprised me. The automatic builtin feature verification
is enforced in codegen, which seems like a layering violation which
should be fixed.
Co-Authored-By: Claude (Opus 4.8) <noreply at anthropic.com>
[llvm-calc-occupancy] Fix title underline length (#213599)
Fix error: invalid header length in
'CommandGuide/llvm-calc-occupancy.rst' (does not match length of title)
in our downstream Sphinx doc build.
Enforce single-operand form for llvm.loop.vectorize metadata (#210932)
This patch implements Phase 2 of the RFC "Enforce Single-Operand Format
for All .enable Metadata Nodes". Please refer to RFC:
https://discourse.llvm.org/t/rfc-enforce-single-operand-format-for-all-enable-metadata-nodes/90571/
The two-operand boolean form !{!"llvm.loop.vectorize.enable", i1 0/1} is
replaced by a single-operand enable/disable pair:
!{!"llvm.loop.vectorize.enable"} ; force vectorization
!{!"llvm.loop.vectorize.disable"} ; suppress vectorization
The Verifier rejects the two-operand form, AutoUpgrade rewrites old
bitcode (including the legacy llvm.vectorizer.enable tag), and the
readers and producers across LLVM, Clang, MLIR and Polly are updated.