[llvm] [SPIR-V] Reject fp128 and ppc_fp128 types with a diagnostic (PR #208397)
Arseniy Obolenskiy via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 05:06:15 PDT 2026
================
@@ -1204,6 +1205,12 @@ SPIRVTypeInst SPIRVGlobalRegistry::createSPIRVType(
: getOpTypeInt(Width, MIRBuilder, false);
}
if (Ty->isFloatingPointTy()) {
+ if (Ty->isFP128Ty() || Ty->isPPC_FP128Ty()) {
+ Function &F = MIRBuilder.getMF().getFunction();
+ F.getContext().diagnose(DiagnosticInfoUnsupported(
+ F, "fp128 is not supported in SPIR-V", DebugLoc(), DS_Error));
+ return getOpTypeFloat(64, MIRBuilder);
----------------
aobolensk wrote:
Is fatal error acceptable for such case? That seems to be a pattern for `reportFatalUsageError` then since we cannot return anything
https://github.com/llvm/llvm-project/pull/208397
More information about the llvm-commits
mailing list