Skip to content

[experiment] See the effects of isLoweredToCall on float libcalls #148401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tgross35
Copy link
Contributor

Cc #148311

tgross35 added 3 commits July 11, 2025 18:32
As noted in the preexisting FIXME above this hunk, the logic in this
function is not always accurate. However, the logic for `long double`
and `_Float128` should be approximately the same for these functions
(almost everything requiring a libcall), so it makes sense to treat them
the same.

This is meant to reduce churn in cases where `*l` and `*f128` lowerings
call to the same symbol so can be used interchangeably.
Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions h -- llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
View the diff from clang-format here.
diff --git a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h b/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
index 0794f080b..abf7502e3 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
+++ b/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
@@ -189,30 +189,34 @@ public:
 
     // // These will all likely lower to a single selection DAG node.
     // // clang-format off
-    // if (Name == "copysign" || Name == "copysignf" || Name == "copysignl" || Name == "copysignl128" ||
-    //     Name == "fabs"  || Name == "fabsf"  || Name == "fabsl" || Name == "fabsl128" ||
-    //     Name == "fmin"  || Name == "fminf"  || Name == "fminl" || Name == "fminl128" ||
-    //     Name == "fmax"  || Name == "fmaxf"  || Name == "fmaxl" || Name == "fmaxl128" ||
-    //     Name == "sin"   || Name == "sinf"   || Name == "sinl"  || Name == "sinl128"  ||
-    //     Name == "cos"   || Name == "cosf"   || Name == "cosl"  || Name == "cosl128"  ||
-    //     Name == "tan"   || Name == "tanf"   || Name == "tanl"  || Name == "tanl128"  ||
-    //     Name == "asin"  || Name == "asinf"  || Name == "asinl" || Name == "asinl128" ||
-    //     Name == "acos"  || Name == "acosf"  || Name == "acosl" || Name == "acosl128" ||
-    //     Name == "atan"  || Name == "atanf"  || Name == "atanl" || Name == "atanl128" ||
-    //     Name == "atan2" || Name == "atan2f" || Name == "atan2l"|| Name == "atan2128l"||
-    //     Name == "sinh"  || Name == "sinhf"  || Name == "sinhl" || Name == "sinhl128" ||
-    //     Name == "cosh"  || Name == "coshf"  || Name == "coshl" || Name == "coshl128" ||
-    //     Name == "tanh"  || Name == "tanhf"  || Name == "tanhl" || Name == "tanhl128" ||
-    //     Name == "sqrt"  || Name == "sqrtf"  || Name == "sqrtl" || Name == "sqrtl128" ||
-    //     Name == "exp10" || Name == "exp10f" || Name == "exp10l"|| Name == "exp10f128")
+    // if (Name == "copysign" || Name == "copysignf" || Name == "copysignl" ||
+    // Name == "copysignl128" ||
+    //     Name == "fabs"  || Name == "fabsf"  || Name == "fabsl" || Name ==
+    //     "fabsl128" || Name == "fmin"  || Name == "fminf"  || Name == "fminl"
+    //     || Name == "fminl128" || Name == "fmax"  || Name == "fmaxf"  || Name
+    //     == "fmaxl" || Name == "fmaxl128" || Name == "sin"   || Name == "sinf"
+    //     || Name == "sinl"  || Name == "sinl128"  || Name == "cos"   || Name
+    //     == "cosf"   || Name == "cosl"  || Name == "cosl128"  || Name == "tan"
+    //     || Name == "tanf"   || Name == "tanl"  || Name == "tanl128"  || Name
+    //     == "asin"  || Name == "asinf"  || Name == "asinl" || Name ==
+    //     "asinl128" || Name == "acos"  || Name == "acosf"  || Name == "acosl"
+    //     || Name == "acosl128" || Name == "atan"  || Name == "atanf"  || Name
+    //     == "atanl" || Name == "atanl128" || Name == "atan2" || Name ==
+    //     "atan2f" || Name == "atan2l"|| Name == "atan2128l"|| Name == "sinh"
+    //     || Name == "sinhf"  || Name == "sinhl" || Name == "sinhl128" || Name
+    //     == "cosh"  || Name == "coshf"  || Name == "coshl" || Name ==
+    //     "coshl128" || Name == "tanh"  || Name == "tanhf"  || Name == "tanhl"
+    //     || Name == "tanhl128" || Name == "sqrt"  || Name == "sqrtf"  || Name
+    //     == "sqrtl" || Name == "sqrtl128" || Name == "exp10" || Name ==
+    //     "exp10f" || Name == "exp10l"|| Name == "exp10f128")
     //   return false;
     // // clang-format on
     // // These are all likely to be optimized into something smaller.
     // if (Name == "pow" || Name == "powf" || Name == "powl" ||
     //     Name == "powf128" || Name == "exp2" || Name == "exp2f" ||
     //     Name == "exp2l" || Name == "floor" || Name == "floorf" ||
-    //     Name == "ceil" || Name == "round" || Name == "ffs" || Name == "ffsl" ||
-    //     Name == "abs" || Name == "labs" || Name == "llabs")
+    //     Name == "ceil" || Name == "round" || Name == "ffs" || Name == "ffsl"
+    //     || Name == "abs" || Name == "labs" || Name == "llabs")
     //   return false;
 
     return true;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant