[PATCH] D47188: Intel SVML calling conventions

Denis Nagorny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 4 04:02:49 PDT 2018


dvnagorny added inline comments.


================
Comment at: lib/Analysis/TargetLibraryInfo.cpp:55
+  std::string FullName = FnName;
+  return IsFast ? FullName : FullName + "_ha";
+}
----------------
hsaito wrote:
> I have a problem for the use of "_ha" interface in the non-fast case. Unless the compiler is in a reasonably relaxed mode, I'd like vector computation and scalar computation to be bitwise-identical. "_ha" interface of SVML doesn't produce the bitwise identical result as scalar call. I'm sure there is a room for using "_ha" interface, but we need to carefully design how to enable it. By simply using SVML, I don't think the programmer gave the compiler a license to deviate from bitwise identical results. I may be too much of a paranoid about it, but there is a fair number of people who ask for bitwise identity.
Quite interesting problem here. AFAIK "_ha" interface provides "high accuracy" versions of functions. (1 ulp), "default" SVML interface provides less precise functions (probably 4ulp). 
So it means that scalar implementation is lesser precise than vectorized one.
On the other hand I'm not sure if it is really possible to have differ libm implementations providing fully bitwise-idenctical results for the whole float or double domain within 4ulps precision.
As not exact units should differ by definition. 


https://reviews.llvm.org/D47188





More information about the llvm-commits mailing list