[llvm] [SPIR-V] Reject fp128 and ppc_fp128 types with a diagnostic (PR #208397)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 02:48:44 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);
----------------
jmmartinez wrote:
M... awkward, we have to return something valid even if it should have been a failure to select.
Is there a way to catch these earlier without polluting all the code?
Otherwise it's fine.
https://github.com/llvm/llvm-project/pull/208397
More information about the llvm-commits
mailing list