[AMDGPU] Price misaligned flat and LDS accesses with the LDS misaligned bug
In WGP mode on subtargets with the LDS misaligned bug, a flat access is
split into pieces no wider than its alignment and no narrower than 4
bytes, and an LDS access aligned below 4 bytes uses 8-byte pieces as one
aligned to 4 does.
[AMDGPU] Price buffer fat pointer memory operations
Price buffer fat pointer accesses as global accesses, except that an
aligned load is not widened and a vector of odd width elements is not
split element by element. Without relaxed buffer bounds checking, a
vector of elements that are a multiple of 32 bits wide is accessed in
pieces no wider than its alignment and no narrower than 4 bytes, and a
vector of other byte-sized or power of 2 wide elements in pieces of the
largest power of 2 bytes that divides the element size. The width comes
from buffer fat pointer lowering, which now exposes it. When the pointer
is a buffer resource plus a constant offset, the offset and a constant
number of records give the same bounds facts lowering uses to access it
in wider pieces.
[AMDGPU] Price constant address space memory operations
Price constant address space accesses as global accesses, except for
loads selected to scalar loads of up to 64 bytes. These are loads from
the 32-bit constant address space, and loads from the constant address
space whose pointer is an argument passed in SGPRs or a constant, plus
constant offsets, both aligned to 4 bytes or to their size. A scalar
load is widened as its lowering does. An integer whose size is not a
multiple of 4 bytes is loaded as whole dwords, plus a byte load when its
size is 7 modulo 8, since the last byte of such a remainder is left out
of the scalar load. A type with no legal dword vector equivalent is
split into the largest power of 2 pieces that fit, and once the
remainder fits in the alignment it is widened to a power of 2 piece of
up to the alignment, at most 8 bytes for byte vectors. A 3-dword
remainder of a legal dword vector takes a fourth dword when aligned to 8
on a subtarget without scalar dwordx3 loads.
[LoongArch] Add support for vector add/sub on vNi128 types
Make v1i128 and v2i128 legal types in the LSX/LASX register classes and
lower ADD/SUB on them to VADD.Q/XVADD.Q and VSUB.Q/XVSUB.Q.
The vNi128 types are intentionally kept out of LSXVTs/LASXVTs so that
only a minimal set of operations is legal on them: LOAD, STORE, BITCAST,
UNDEF, ADD, SUB and VSELECT (via [X]VBITSEL.V). VECTOR_SHUFFLE is custom
lowered by performing the shuffle on the equivalent i64 vector type.
Everything else keeps the default Expand action.
Since the widening extend combine can now produce VEXTH/VEXTH_U on
vNi128, also add the [X]VEXTH.Q.D and [X]VEXTH.QU.DU patterns.
[LoongArch][NFC] Add tests for vector add/sub on vNi128
Also add tests for load/store, select and shuffle on vNi128 types to
make sure operations without dedicated support are still legalized
correctly.
Revert "[clang][Sema] Recheck array size once the element type is complete" (#239935)
Reverts llvm/llvm-project#219817
Causes a large compile-time regression.
[clang][Diagnostics] Don't drop "no-" when reporting an unknown -Wno-error= option (#239212)
Fixes #227392
If you pass `-Wno-error=foo` and clang doesn't know the `foo` warning
group, the
message you get back is about `-Werror=foo`. The `no-` is gone, and the
"did you
mean" suggestion drops it as well, so the flag in the message isn't the
one you
actually passed. The reporter hit this with
`-Wno-error=maybe-uninitialized`
from a GCC build and couldn't tell what to remove.
Nothing is lost before this point. `ProcessWarningOptions` pulls off the
`no-`
and stores it in `isPositive`, and the plain `-W` and `-R` paths already
use it
when building the prefix. The `-Werror=` and `-Wfatal-errors=` paths had
[30 lines not shown]
[MC] Remove DWARFCFIChecker (#237681)
The checker (#145633) processes instructions in program order and
attributes each CFI directive to the preceding instruction, so the CFA
reset after a mid-function epilogue is reported as an error. On `clang
-S -O2` output of llvm/lib/Support/{APInt,StringRef,raw_ostream}.cpp
(354 functions), `llvm-mc --validate-cfi` reports 294 errors, all false
positives, plus 3083 warnings. It also ignores .cfi_remember_state and
.cfi_restore_state.
Making it usable requires a CFG with jump tables, landing pads, and
noreturn calls, which is a rewrite. Nothing uses it besides its own
tests, while every new CFI directive has to be handled in
DWARFCFIState::convert.
LLM-aided
Discussion: https://discourse.llvm.org/t/rfc-dwarf-cfi-validation/86936
[MC] Declare the MCTargetOptions command line options in TableGen
Move RegisterMCTargetOptionsFlags options into a private `MCToolOptions`
struct, different from MCCLOptions since `MCToolOptions` requires tool
opt-in. RegisterMCToolOptions, renamed from RegisterMCTargetOptionsFlags
(LLVMOption and clang driver use "flags" for boolean options), registers
the struct, so `clang -mllvm -crel` remains an error.
Remove the getters without outside readers. llc reads `MCRelaxAll`
instead of `getExplicitRelaxAll`, so `-mc-relax-all=false` no longer
warns with a non-object file type.
LLM-aided
[CodeGen][MC] Pass a LibraryOptionsContext to the MC option readers. NFC
Rename `InitMCTargetOptionsFromFlags` to `getMCTargetOptions` and
`InitTargetOptionsFromCodeGenFlags` to `getTargetOptions`. Most of these
options take values, so "Flags" is a misnomer.
These functions and `getABIName` now take the `LibraryOptionsContext` to read
from. A per-context option declared in TableGen has no global value.
LLM-aided
[llvm-mc-assemble-fuzzer] Remove mc::InitMCTargetOptionsFromFlags (#239913)
Just use default MCTargetOptions. The tool should probably be removed,
but for now drop the mc::InitMCTargetOptionsFromFlags call to simplify
the work making mc::InitMCTargetOptionsFromFlags read from library
options instead.
[BOLT] Remove unneeded mc::RegisterMCTargetOptionsFlags (#239910)
PR #100800 added this registration because DwarfStreamer::init called
mc::InitMCTargetOptionsFromFlags, which asserts if the options are not
registered, and #100771 removed the registration from DWP.
DwarfStreamer also no longer needs these MC tool options.
[X86] Fix -Wunused-variable from #239777 (#239902)
Deleted some uses that left other variables unused outside of LLVM_DEBUG
which is only enabled with LLVM_ENABLE_ASSERTIONS, leaving release
builds with -Wunused-variable.
Mark [[maybe_unused]] to prevent the warning as-is standard.
[SLP] Pruning when there is no Undef
A poison value and concrete value can always pass
isGuaranteedNotToBePoison. Nowadays, we generates very few undef
value. So the prunning here makes sense as we try to do linear check
to find a possible undef instead of calling the very expensive
isGuaranteedNotToBePoison.
[DWARFLinker] Remove mc::RegisterMCTargetOptionsFlags (#239904)
dsymutil, llvm-dwarfutil, and the DwarfGenerator unittest never
parse/use these MC command line options. These were added around 2020
for "Move DwarfStreamer into DWARFLinker".
[clang][bytecode] Remove unused InlineDescriptor constructor (NFC) (#239688)
The last callers of InlineDescriptor::InlineDescriptor were removed on
November 6, 2026 in commit 0a0e65b2e8ff6043d85ab07c4d23ea18bf0b9b7d.
Assisted-by: Antigravity
AArch64: Use the DAG's libcall info (#239895)
Use the analysis libcall info instead of the static copy in
TargetLowering, which will eventually be removed.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>