[clang] [clang] Make -fveclib={ArmPL, SLEEF} imply -fno-math-errno (PR #112580)

Paul Walker via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 21 04:25:39 PDT 2024


================
@@ -3125,6 +3140,13 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
       TrappingMathPresent = true;
       FPExceptionBehavior = "strict";
       break;
+    case options::OPT_fveclib:
+      VecLibArg = A;
+      if (llvm::is_contained(VecLibImpliesNoMathErrno, A->getValue())) {
+        MathErrno = false;
+        NoMathErrnoWasImpliedByVecLib = true;
+      }
----------------
paulwalker-arm wrote:

It would be unusual but I suggest 
```
NoMathErrnoWasImpliedByVecLib = llvm::is_contained(VecLibImpliesNoMathErrno, A->getValue());
if (NoMathErrnoWasImpliedByVecLib)
  MathErrno = false;
```
to cover the `-fveclib=ArmPL -fmath-errno -fveclib=LIBMVEC` scenario.

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


More information about the cfe-commits mailing list