[clang] clang/OpenCL: set sqrt fp accuracy on call to Z4sqrt (PR #66651)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 25 01:08:51 PDT 2023


================
@@ -5612,6 +5612,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
                               BundleList);
     EmitBlock(Cont);
   }
+  if (CI->getCalledFunction() && CI->getCalledFunction()->hasName() &&
+      CI->getCalledFunction()->getName().startswith("_Z4sqrt")) {
----------------
arsenm wrote:

Maybe it's good enough, I guess the Z4 filters out other prefixes. Not sure about arbitrary custom ext_vector_type

https://github.com/llvm/llvm-project/pull/66651


More information about the cfe-commits mailing list