diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2024-05-05 21:50:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-05 21:50:57 +0100 |
| commit | 15f7148eae89a36696916e15ed4c83fb7fed01c5 (patch) | |
| tree | 1b743cb73db6ee1e5849820739c535e5a36f917f /src/llvm_backend_utility.cpp | |
| parent | 1e5267c8e7ab1777e6691d28b4cf84f62c5e1871 (diff) | |
| parent | 25f1d0906d2b5a8276c3832783970a798c12cc6c (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.cpp | 3 |
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; |