[clang] [llvm] [clang][RISCV] Use macro to check if intrinsics are supported (PR #187197)
Brandon Wu via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 31 22:02:51 PDT 2026
4vtomat wrote:
> RISCVUsage says we don't have any experimental intrinsics, but we should probably have a view on whether these are defined for them or not - understanding that experimental intrinsics can and have changed.
Yeah I think it's reasonable to let user know if intrinsic is experimental, some ideas come up to my mind:
1. append "experimental" prefix to defined macro, e.g. #define __riscv_v_intrinsic_experimental_xxxx
2. emit an error with message if experimental feature is not presented for those intrinsics that are needed
I would prefer 2 because users may not know if the intrinsic is ratified so they won't be able to know whether to append "experimental" prefix or not. It's also much clear to tell user what's exactly happening
https://github.com/llvm/llvm-project/pull/187197
More information about the cfe-commits
mailing list