[llvm] [Verifier] Verify attribute `denormal-fp-math[-f32]` (PR #112310)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 22:24:59 PDT 2024
================
@@ -2401,6 +2401,25 @@ void Verifier::verifyFunctionAttrs(FunctionType *FT, AttributeList Attrs,
if (!Info)
CheckFailed("invalid name for a VFABI variant: " + S, V);
}
+
+ auto IsValidDenormalMode = [](StringRef S) {
+ DenormalMode Denormals = parseDenormalFPAttribute(S);
+ return Denormals.Input != DenormalMode::Invalid &&
+ Denormals.Output != DenormalMode::Invalid;
----------------
arsenm wrote:
```suggestion
return Denormals.isValid();
```
https://github.com/llvm/llvm-project/pull/112310
More information about the llvm-commits
mailing list