Skip to content

Commit 0848fc0

Browse files
committed
[Verifier] Address reviewe comments. NFC.
1 parent 44accc6 commit 0848fc0

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

llvm/lib/IR/Verifier.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,21 +2402,15 @@ void Verifier::verifyFunctionAttrs(FunctionType *FT, AttributeList Attrs,
24022402
CheckFailed("invalid name for a VFABI variant: " + S, V);
24032403
}
24042404

2405-
auto IsValidDenormalMode = [](StringRef S) {
2406-
DenormalMode Denormals = parseDenormalFPAttribute(S);
2407-
return Denormals.Input != DenormalMode::Invalid &&
2408-
Denormals.Output != DenormalMode::Invalid;
2409-
};
2410-
24112405
if (auto A = Attrs.getFnAttr("denormal-fp-math"); A.isValid()) {
24122406
StringRef S = A.getValueAsString();
2413-
if (!IsValidDenormalMode(S))
2407+
if (!parseDenormalFPAttribute(S).isValid())
24142408
CheckFailed("invalid value for 'denormal-fp-math' attribute: " + S, V);
24152409
}
24162410

24172411
if (auto A = Attrs.getFnAttr("denormal-fp-math-f32"); A.isValid()) {
24182412
StringRef S = A.getValueAsString();
2419-
if (!IsValidDenormalMode(S))
2413+
if (!parseDenormalFPAttribute(S).isValid())
24202414
CheckFailed("invalid value for 'denormal-fp-math-f32' attribute: " + S,
24212415
V);
24222416
}

0 commit comments

Comments
 (0)