[PATCH] D146845: [FPEnv] [WIP] Verify strictfp attribute correctness, first part, 2023 edition
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 7 15:14:53 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/IR/Verifier.cpp:6030
bool HasRoundingMD;
+ Check(FPI.getCaller()->hasFnAttribute(Attribute::StrictFP) == true,
+ "Constrained FP intrinsics require functions have strictfp attribute.",
----------------
Drop "== true"
================
Comment at: llvm/test/Verifier/fp-intrinsics.ll:54-58
+; Test for mismatched function and function call attributes
+; CHECK-NEXT: Functions and their contained calls and invokes must match in use of attribute strictfp!
+; CHECK-NEXT: ptr @f6
+; CHECK-NEXT: %fadd = call double @llvm.experimental.constrained.sqrt.f64(double %a, metadata !"round.dynamic", metadata !"fpexcept.strict")
+define double @f6(double %a) #0 {
----------------
Something is wrong here, there should be no error. The parent function has strictfp, and strictfp should always be implied by the intrinsic definition
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146845/new/
https://reviews.llvm.org/D146845
More information about the llvm-commits
mailing list