about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_codegen_llvm/src/context.rs10
-rw-r--r--compiler/rustc_codegen_llvm/src/intrinsic.rs10
2 files changed, 14 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs
index 0c6006fbc6a..b0d8e11d1fb 100644
--- a/compiler/rustc_codegen_llvm/src/context.rs
+++ b/compiler/rustc_codegen_llvm/src/context.rs
@@ -1012,7 +1012,10 @@ impl<'ll> CodegenCx<'ll, '_> {
         ifn!("llvm.minimum.f16", fn(t_f16, t_f16) -> t_f16);
         ifn!("llvm.minimum.f32", fn(t_f32, t_f32) -> t_f32);
         ifn!("llvm.minimum.f64", fn(t_f64, t_f64) -> t_f64);
-        ifn!("llvm.minimum.f128", fn(t_f128, t_f128) -> t_f128);
+        // There are issues on x86_64 and aarch64 with the f128 variant.
+        //  - https://github.com/llvm/llvm-project/issues/139380
+        //  - https://github.com/llvm/llvm-project/issues/139381
+        // ifn!("llvm.minimum.f128", fn(t_f128, t_f128) -> t_f128);
 
         ifn!("llvm.maxnum.f16", fn(t_f16, t_f16) -> t_f16);
         ifn!("llvm.maxnum.f32", fn(t_f32, t_f32) -> t_f32);
@@ -1022,7 +1025,10 @@ impl<'ll> CodegenCx<'ll, '_> {
         ifn!("llvm.maximum.f16", fn(t_f16, t_f16) -> t_f16);
         ifn!("llvm.maximum.f32", fn(t_f32, t_f32) -> t_f32);
         ifn!("llvm.maximum.f64", fn(t_f64, t_f64) -> t_f64);
-        ifn!("llvm.maximum.f128", fn(t_f128, t_f128) -> t_f128);
+        // There are issues on x86_64 and aarch64 with the f128 variant.
+        //  - https://github.com/llvm/llvm-project/issues/139380
+        //  - https://github.com/llvm/llvm-project/issues/139381
+        // ifn!("llvm.maximum.f128", fn(t_f128, t_f128) -> t_f128);
 
         ifn!("llvm.floor.f16", fn(t_f16) -> t_f16);
         ifn!("llvm.floor.f32", fn(t_f32) -> t_f32);
diff --git a/compiler/rustc_codegen_llvm/src/intrinsic.rs b/compiler/rustc_codegen_llvm/src/intrinsic.rs
index c68e0036d6e..5ca57375292 100644
--- a/compiler/rustc_codegen_llvm/src/intrinsic.rs
+++ b/compiler/rustc_codegen_llvm/src/intrinsic.rs
@@ -106,8 +106,9 @@ fn get_simple_intrinsic<'ll>(
         sym::minimumf16 => "llvm.minimum.f16",
         sym::minimumf32 => "llvm.minimum.f32",
         sym::minimumf64 => "llvm.minimum.f64",
-        sym::minimumf128 => "llvm.minimum.f128",
-
+        // There are issues on x86_64 and aarch64 with the f128 variant,
+        // let's instead use the instrinsic fallback body.
+        // sym::minimumf128 => "llvm.minimum.f128",
         sym::maxnumf16 => "llvm.maxnum.f16",
         sym::maxnumf32 => "llvm.maxnum.f32",
         sym::maxnumf64 => "llvm.maxnum.f64",
@@ -116,8 +117,9 @@ fn get_simple_intrinsic<'ll>(
         sym::maximumf16 => "llvm.maximum.f16",
         sym::maximumf32 => "llvm.maximum.f32",
         sym::maximumf64 => "llvm.maximum.f64",
-        sym::maximumf128 => "llvm.maximum.f128",
-
+        // There are issues on x86_64 and aarch64 with the f128 variant,
+        // let's instead use the instrinsic fallback body.
+        // sym::maximumf128 => "llvm.maximum.f128",
         sym::copysignf16 => "llvm.copysign.f16",
         sym::copysignf32 => "llvm.copysign.f32",
         sym::copysignf64 => "llvm.copysign.f64",