[PATCH] D154495: clang: Attach !fpmath metadata to __builtin_sqrt based on language flags
Matt Arsenault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 5 14:30:11 PDT 2023
arsenm added inline comments.
================
Comment at: clang/lib/CodeGen/CGExpr.cpp:5602
+ // source are correctly rounded.
+ SetFPAccuracy(Val, 2.5);
+ }
----------------
arsenm wrote:
> yaxunl wrote:
> > the spec says sqrt relative error is 3ULP https://registry.khronos.org/OpenCL/specs/2.2/html/OpenCL_C.html#relative-error-as-ulps
> Did that change between versions? In any case I don’t want to change the currently used threshold in this patch. We only need 1.0 anyway
Oh, I see the threshold is 2.5 for fdiv and 3.0 for sqrt.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154495/new/
https://reviews.llvm.org/D154495
More information about the cfe-commits
mailing list