[HLSL] Add handling of Interpolation Modifiers (#225452)
This change adds support for the parsing of interpolation modifiers and
setting them in the corresponding signature element metadata.
Briefly, it works by first parsing the metadata and, if multiple are
specified, merging them into a single set of modifiers. Then it performs
a semantic analysis on the modifiers that are actually used in the
shader. Finally it sets the corresponding Interpolation Mode in the
signature element metadata. More details are available
[here](https://github.com/llvm/wg-hlsl/blob/main/proposals/0047-semantic-signatures-metadata-schema.md#interpolation-modifiers).
Resolves: https://github.com/llvm/llvm-project/issues/189762
Assisted by: ChatGPT 6 Astra
[CIR] Pass only 'this' to an inherited ctor from a virtual base (#229516)
The base-object variant of an inheriting constructor whose inherited
constructor lives in a virtual base takes no arguments, since it doesn't
construct that base. We were hitting an NYI here. This change passes
just 'this', as classic codegen does.
Depends on #229514.
Assisted-by: Claude Code / Claude Opus 5.5
Mk/bsd.port.mk: revert fix cross compilation of kmods
This reverts commit 65fdabc9b93f0fef6cffe5eaca30d646286e0edb.
This has unexpected side effect and should have been done via an exp-run
[InstCombine] Use UTC for ffs-1.ll (#229841)
The IR was mostly in the generated form already and this makes future
updates easier (like the one in the child patch).
[Sema] reject throw-catching of ptr's and ref's that require cross-address-space conversions (#224680)
Current runtimes don't support cross-address-space conversions yet, so
reject the pointers and refs that will require cross-address-space
conversions later, within the sema. This will prevent the
cross-address-space conversion attempt in codegen.
fixes: #222931
[LV] Don't vectorize loops using swifterror values. (#229875)
swifterror values may only be used as the pointer operand of loads and
stores or as swifterror call arguments. When vectorizing, those
guarantees are usually broken. Detect and skip vectorizing in those
cases.
Fixes crashes in the added tests.
[CMake] Honor symbol export lists for Emscripten (#229715)
I ran into this while building LLVM 23.1.2 with Emscripten 6.x for
emscripten-forge, for both wasm32 and wasm64. Check here :
https://github.com/emscripten-forge/recipes/pull/7258
The build completes, but the wasm64 package test fails with:
```text
Error: libRemarks.so is not built for architecture wasm64
```
Looking at the library, it only exports `LLVMRemarkVersion` besides the
module constructor. The remaining Remarks APIs are missing because their
definitions live in static dependency archives and are never pulled into
the shared library. The resulting tiny module is reported as wasm32 even
in the wasm64 build. The missing APIs affect wasm32 too; its
architecture check just happens to pass.
[10 lines not shown]
[IRBuilder] Add getModule() method (#229832)
Add a getModule() helper method, which gets the module from the
insertion point. In the future, this will hopefully return the module
stored directly in IRBuilder.
[mlir][arith] Preserve IEEE signed zeros when folding constant mulf (#226205)
The nnan+nsz identity mulf(x, 0) -> 0 was applied even when both
operands were constants, so (-c) * +0.0 folded to +0. LLVM
constant-folds that case with APFloat and keeps -0. Skip the algebraic
fold when both operands are constants.
AMDGPU: Un-XFAIL vgpr-spill-emergency-stack-slot-compute.ll (#229859)
This was marked XFAIL in c4d256a59049 when divergence driven ISel
moved the uniform dynamic vector index into an SGPR, and was never
updated. The checks have since gone stale further: the scratch wave
offset register is now folded into the scratch resource descriptor,
code object v2 kernel_code_t fields are gone, and the default
1024 workitem flat workgroup size limits the VGPR budget to 64.
Update the checks to reflect the spill code using the reserved scratch
resource descriptor. Add amdgpu-no-flat-scratch-init, as the attributor
would infer, to restore the check that VGPR spilling does not require
flat scratch.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[RISCV] Replace hasStdExtC() with hasStdExtZcf() && hasStdExtZcd(). (#229870)
We've migrated every other use of hasStdExtC() to hasStdExtZca() or
similar. This appears to be the last one left.
Since we require D here I've replaced the check with (is64Bit() ||
hasStdExtZcf()) && hasStdExtZcd() to be faithful to what the code was
doing before.
[Offload][omp] Fixes to device initialization (#229884)
Fix wrong format specifier in iterateDevices.
Fix registering an image when device initialization failed.
Assisted by Claude.