[CIR] Use per-element zero-initialization with array new (#187760)
There was a discrepancy between the CIR and classic codegen handling of
zero-initialization of constructed objects with array new. Classic
codegen performs zero-initialization on a per-element basis, while CIR
had been inserting a single zero-initialization of the entire array
before individually constructing the elements.
This change aligns the CIR behavior with the classic codegen behavior.
[PowerPC] Add target feature validation for builtins in Sema (#187371)
Adds early target feature checking for PowerPC builtins during semantic
analysis, catching missing target features before code generation and
providing better error messages to users.
Assisted by AI.
[CIR] Implement pointer type RTTI (#184011)
#163601
#163850
---------
Signed-off-by: Nikita B <n2h9z4 at gmail.com>
Co-authored-by: Nikita B <n2h9z4 at gmail.com>
Co-authored-by: Copilot <175728472+Copilot at users.noreply.github.com>
[Hexagon] Add MC checker and relocation coverage tests (#183955)
Add tests targeting HexagonMCChecker, MC relocation encoding, and ELF
object writing:
- packet-constraint-checks.s: MCChecker packet constraint violation
detection including solo instructions, slot restrictions, and read-write
hazards. Improves HexagonMCChecker.cpp line coverage from 46.53% to
84.23%.
- checker-solo-cof-slots.s: MCChecker hardware loop restrictions and
slot overflow handling.
- reloc-tls-gd.s: MC relocation encoding for TLS GD/LD/IE/LE variants.
Improves HexagonMCCodeEmitter.cpp line coverage from 74.18% to 91.14%.
- reloc-data-sizes.s: MC relocation encoding for data-size relocations
(8/16/32-bit).
[2 lines not shown]
Load auth_rpcgss at boot to fix Kerberos NFS after manual start
gssproxy writes 1 to `/proc/net/rpc/use-gss-proxy` once at startup. If
the proc file doesn't exist yet (`auth_rpcgss` not loaded), it silently
gives up. v0.9.2 adds a 10-second retry timer for this case,
but TrueNAS ships v0.9.1.
When NFS is started manually with auto-start disabled, `gssproxy` has
already started and given up. The kernel's `use_gss_proxy` flag stays -1
and the first Kerberos client locks it to 0 (one-shot latch), breaking
`RPCSEC_GSS` until reboot. Loading `auth_rpcgss` early ensures the proc
file exists before gssproxy starts.
Tested with NFS auto-start disabled and rebooting. Before fix,
`use-gss-proxy` stayed -1 after manual NFS start and a raw
`RPCSEC_GSS_INIT` request locked it to 0. After fix, `use-gss-proxy`
is 1.
[libFuzzer] Fix -Wunused-variable when building with NDEBUG (#188301)
The variable `FuzzerInitIsRunning` is only used within `assert()`.
Follow up to #178342.
[lldb] Fix trace load hang (#187768)
#179799 removed the `SetPrivateState(eStateStopped)` call in
`ProcessTrace::DidAttach()`. This makes the call to
`WaitForProcessToStop` hang forever, causing the `trace load` command to
hang.
This fix reintroduces the `SetPrivateState` call so a postmortem trace
process will "stop" after being loaded, matching the logic used in
`Process::LoadCore()`.
[CFGuard] Consider function aliases as indirect call targets (#188223)
With vector deleting destructors, it's common to include function
aliases in vftables.
After #185653 it's become more likely that the alias gets overridden in
a different TU. It's therefore important that it's the alias itself that
goes in the control-flow guard table.
[IR] Allow non-constrained math intrinsics in strictfp functions
The current implementation of floating-point support uses two different
representations for each floating-point operation, such as `llvm.trunc`
and `llvm.experimental.constrained.trunc`. The main difference between
them is the presence of side effects that describe interaction with the
floating-point environment. Which of the two functions should be used is
determined by the enclosing function's attribute 'strictfp'. The
compiler does not check whether a regular functions, like `llvm.trunc`
is used in a strictfp function, so maintaining consistency is the user's
responsibility. It is easy to mistakenly use the regular,
side-effect-free intrinsic in a strictfp function, and even LLVM tests
contain examples of this.
If the variant of intrinsic is determined solely by the 'strictfp'
function attribute, the distinction between the two forms appear to be
redundant, and the regular form could be used in all cases. This would
require the compiler to deduce side effects from the function
attributes. In this scenario, floating-point operations would have
[17 lines not shown]
[RISCV] Merge Base Offset for SFB Pseudos (#187620)
This implements the Merge Base Offset pass for the SFB Load Pseudos.
These Pseudos are expanded after Merge Base Offset, so the pass needs to
handle them.
I also had to extend support in MergeBaseOffset to ensuring that ImmOp
could be a Constant Pool Index, which seemed to be supported in some
checks but not others.
[NVPTX] Fix assumption of sm versioning (#188282)
The test case in #188118 assumes sm-90 is always available, leading to a
crash
```
# | ptxas fatal : SM version specified by .target is higher than default SM version assumed
```
This PR updates the test case to follow the check specified in
`llvm/test/CodeGen/NVPTX/cp-async-bulk-tensor-reduce.ll`,
namely `%if ptxas-sm_90 && ptxas-isa-7.8`