[PATCH] D69798: Implement inlining of strictfp functions
Kevin P. Neal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 06:44:27 PST 2019
kpn added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/CloneFunction.cpp:331
+ Args.push_back(RoundingMode);
+ Args.push_back(ExBehavior);
+
----------------
Not all constrained intrinsics take both metadata arguments. See the LangRef or the IR verifier for the details.
================
Comment at: llvm/lib/Transforms/Utils/CloneFunction.cpp:333
+
+ NewInst = CallInst::Create(IFn, Args, OldInst.getName() + ".strict");
+ } else {
----------------
I don't see the strictfp attribute being added to the call.
================
Comment at: llvm/lib/Transforms/Utils/CloneFunction.cpp:335
+ } else {
+ NewInst = II->clone();
+ }
----------------
Is this the path that a call instruction goes through? Because it'll need the strictfp attribute added.
================
Comment at: llvm/test/Transforms/Inline/inline_strictfp.ll:15
+ %0 = tail call float @func_01(float %a)
+ %add = call float @llvm.experimental.constrained.fadd.f32(float %0, float 2.000000e+00, metadata !"round.dynamic", metadata !"fpexcept.strict")
+ ret float %add
----------------
All function calls in a strictfp-marked function require the strictfp attribute. See D68233 for the current version of the verifier for this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69798/new/
https://reviews.llvm.org/D69798
More information about the llvm-commits
mailing list