[Hexagon] Add cmake caches for cross-toolchain distribution build (#201207)
Adds and extends the
clang/cmake/caches/hexagon-unknown-linux-musl-clang* files to drive a
full install-distribution build: host tools, per-target builtins (Linux
and baremetal), and runtimes for hexagon-unknown-linux-musl.
[AArch64][llvm] Restrict luti6 (4 regs, 8-bit) to 0 <= Zn <= 7
The `luti6` instruction (table, four registers, 8-bit) should only
allow `0 <= Zn <= 7`, since there's only 3 bits. It actually allows:
```
luti6 { z0.b - z3.b }, zt0, { z8 - z10 }
```
which produces a duplicate encoding to the following:
```
luti6 { z0.b - z3.b }, zt0, { z0 - z2 }
```
Fix tablegen to ensure Zn is only allowed in correct range of 0 to 7.
[libc] Add explicit format attributes for modular printf (#201212)
We had been relying on compiler-generated format attributes when using
the modular_format attribute for printf-family functions, but this is
not applied in -ffreestanding mode. When modular format is enabled, libc
is explicitly asserting the semantics of these functions, so it should
be explicit about the format attributes as well to keep them from
breaking in -ffreestanding.
Generated by Gemini, reviewed and edited by hand.
NAS-141068 / 27.0.0-BETA.1 / Properly handle VM feature flag (#19027)
## Context
Middleware should expose the VM entitlement as "VMS" at the API boundary
and to any consumer that inspects license features. The signed license
PEM and signing daemon continue to carry "VM" as the JSON key, and
existing customer PEMs can't be re-keyed without re-signing, so the
translation has to happen middleware-side.
## Solution
A single `FEATURE_NAME_MAP` in license_utils.py translates "VM" → "VMS"
for both the daemon-signed and legacy parsers (the legacy-only JAILS →
APPS entry sits in the same map; it's a no-op on the modern path since
the daemon never emits "JAILS"). v26 and v27 SystemFeatureEnabledArgs
both accept "VMS" and carry from_previous / to_previous adapters so v25
/ v26 clients passing "VM" are translated transparently.
[AMDGPU] Fix backward compatibility kernarg preload prolog base offset (#201355)
Backward compatibility preload prolog loaded args from kernarg-segment
byte 0, but on non-AMDHSA triples the explicit args start at
`getExplicitKernelArgOffset()` (value: 36), so preloaded SGPRs held the
runtime header instead of the arguments
[SelectionDAG] Fix missed optimization for CLMUL where one operand is all ones (#200592)
Fixes #200556
This special case is equivalent to a "parallel prefix XOR" or "bitwise
parity" operation, which can be expanded to a logarithmic amount of
bitwise operations instead of a linear amount (relative to the bit
width). When other bitwise operations such as BDEP and BEXT are
expanded, they rely on that operation being lowered to a CLMUL directly
or expanded to this efficient form.
See also
- #200570 (this PR needs this fix to have good codegen)
[flang][openacc] change option feature flag names to address comments. (#200037)
- Fixes FeatureFlags and CLI flags to use OpenACC instead of ACC.
- Offline comments further refined the name to be
OpenACCDefaultNoneScalarsStrict
- Which changes the semantics requiring the user to opt out of the
default behavior, instead of opt-in to an extension.
- Also makes the CLI flag OptOut instead of OptIn to match the cli
behavior.
- Gets rid of the unneeded warning flag since FeatureFlags have both a
disabled bit and a warning bit.
- Updates old test for these changes and adds a new test to document all
the different cli configurations.
[GISel][CallLowering] Set byval flag for inalloca/preallocated args (#200600)
GlobalISel asserts when lowering a function with an `inalloca` or
`preallocated` argument:
> TargetCallingConv.h:183: void
llvm::ISD::ArgFlagsTy::setByValSize(unsigned): Assertion `isByVal() &&
!isByRef()' failed.
https://godbolt.org/z/jWr4enjaj
`addFlagsFromAttrSet()` sets the `InAlloca`/`Preallocated` flags but
never `ByVal`.
`setArgFlags()` then calls `Flags.setByValSize()` for any non-`ByRef`
indirect argument which asserts `isByVal()`.
`SelectionDAGISel::LowerArguments()` avoids this by deliberately also
setting the `ByVal` flag for `inalloca`/`preallocated`, this change
makes the GlobalISel side match that behavior.