Landing: 4e05c2ca4325

Project / Subsystem

gcc / risc-v

Date

2026-05-18

Author

Christoph Müllner

Commit

4e05c2ca43252e52a265d38c89b0f01abaeea6bd

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
risc-v
patch_id
commit_hash
4e05c2ca43252e52a265d38c89b0f01abaeea6bd
source_type
github
headline
RISC-V: Add intrinsic detection macros for compiler support.
tldr
Adds macros to detect compiler support for RISC-V intrinsic APIs, independent of the target architecture.
author
Christoph Müllner
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • risc-v
  • intrinsics
  • feature detection
discussion_id_link
bugzilla_pr
date
2026-05-18T00:00:00.000Z

This patch introduces macros that allow users to detect compiler support for RISC-V intrinsic APIs. These macros, defined in the corresponding intrinsic headers, indicate compiler support independently of the -march setting. Scalar composite macros are derived from their component macros, ensuring they are defined only when all component intrinsic headers are included, improving the accuracy of feature detection.