aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_utility.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2024-05-05 21:50:57 +0100
committerGitHub <noreply@github.com>2024-05-05 21:50:57 +0100
commit15f7148eae89a36696916e15ed4c83fb7fed01c5 (patch)
tree1b743cb73db6ee1e5849820739c535e5a36f917f /src/llvm_backend_utility.cpp
parent1e5267c8e7ab1777e6691d28b4cf84f62c5e1871 (diff)
parent25f1d0906d2b5a8276c3832783970a798c12cc6c (diff)
Merge pull request #3526 from laytan/target-features
Improve target features support
Diffstat (limited to 'src/llvm_backend_utility.cpp')
-rw-r--r--src/llvm_backend_utility.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/llvm_backend_utility.cpp b/src/llvm_backend_utility.cpp
index c01ab0692..db99ebc99 100644
--- a/src/llvm_backend_utility.cpp
+++ b/src/llvm_backend_utility.cpp
@@ -1708,7 +1708,8 @@ gb_internal lbValue lb_emit_mul_add(lbProcedure *p, lbValue a, lbValue b, lbValu
if (is_possible) {
switch (build_context.metrics.arch) {
case TargetArch_amd64:
- if (type_size_of(t) == 2) {
+ // NOTE: using the intrinsic when not supported causes slow codegen (See #2928).
+ if (type_size_of(t) == 2 || !check_target_feature_is_enabled(str_lit("fma"), nullptr)) {
is_possible = false;
}
break;