Skip to content

Make unary float intrinsics generic#153934

Open
N1ark wants to merge 5 commits intorust-lang:mainfrom
N1ark:generic-float-unops2
Open

Make unary float intrinsics generic#153934
N1ark wants to merge 5 commits intorust-lang:mainfrom
N1ark:generic-float-unops2

Conversation

@N1ark
Copy link
Copy Markdown
Contributor

@N1ark N1ark commented Mar 16, 2026

Follow up PR to #153834, commits split for readability

Commit 1 cleans up the cranelift code to make subsequent commit diffs simpler.
The rest of the commits apply the same merging as done before to the rest of the unary float intrinsics, namely

  • commit 2: floor, ceil, trunc, round_ties_even, round,
  • commit 3: sqrt
  • commit 4: sin, cos
  • commit 5: exp, exp2, log, log2, log10

The intrinsics were renamed to be the name of the function without the f_ part. for most this makes sense, but it does mean there is intrinsics::log which might be misleading (since it's not a logging function); happy to rename it

r? tgross35

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 16, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 16, 2026

tgross35 is currently at their maximum review capacity.
They may take a while to respond.

@N1ark N1ark changed the title Make float unary intrinsics generic Make unary float intrinsics generic Mar 16, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@N1ark N1ark closed this Apr 5, 2026
@N1ark N1ark force-pushed the generic-float-unops2 branch from 1edf65b to 9602bda Compare April 5, 2026 17:11
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 5, 2026
@N1ark N1ark reopened this Apr 5, 2026
@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 5, 2026
@N1ark N1ark marked this pull request as ready for review April 5, 2026 17:48
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 5, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 5, 2026

Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.

cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

stdarch is developed in its own repository. If possible, consider making this change to rust-lang/stdarch instead.

cc @Amanieu, @folkertdev, @sayantn

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 5, 2026
@N1ark N1ark force-pushed the generic-float-unops2 branch 2 times, most recently from 03450ad to 24dd8fb Compare April 5, 2026 17:59
Comment on lines +422 to +427
enum IntrinsicKind {
Builtin(&'static str),
Extern(&'static str),
BuiltinF16Cast(&'static str),
Fallback,
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the only part of the PR where I did something weird; @antoyo you might want to double check it's fine. basically i wanted to keep the exact same behaviour as before merging the intrinsics, but the GCC frontend has very inconsistent treatment of them: some have a builtin name, some use an external function, some f16's go through a f32 and cast down (but not all, and with a different name from the f16?), etc. so i made an enum to clarify what handling is chosen without fiddling with the behaviour as i have no expertise there

if i'm misunderstanding something and there is actually a prettier/more succint way of doing this do let me know :) e.g. the f16 casts use __builtin_sqrt, but f32 uses the builtin sqrtf: is there a difference there?

@rust-log-analyzer

This comment has been minimized.

@N1ark
Copy link
Copy Markdown
Contributor Author

N1ark commented Apr 5, 2026

not sure how to fix this; where do the additional symbols come from?

&self,
x: F,
mode: rustc_apfloat::Round,
) -> InterpResult<'tcx, Scalar<M::Provenance>>
Copy link
Copy Markdown
Member

@RalfJung RalfJung Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

View changes since the review

It is oddly inconsistent to take an F but return a Scalar. Why that choice?

Copy link
Copy Markdown
Contributor Author

@N1ark N1ark Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just because this was the simplest :)

  • float_round's two callers can easily do the ImmTy -> Scalar -> F conversion (it's needed there to avoid re-specifying the float type every time), so we might as well re-use the F
  • returning an F would mean resolving the InterpResult to re-convert it into a scalar every time, so we might as well save the work and not redo it outside (this also would impact intrinsics/simd.rs)

agree it's not the prettiest signature but it's the most practical for how its used

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... I guess it's a private function so it's not worth too much effort to make it pretty. Fair.^^

@RalfJung
Copy link
Copy Markdown
Member

RalfJung commented Apr 9, 2026

not sure how to fix this; where do the additional symbols come from?

The error happens in clippy, so those symbols are likely part of the clippy symbol list and have to be removed there. See src/tools/clippy/clippy_utils/src/sym.rs.

@N1ark N1ark force-pushed the generic-float-unops2 branch from 24dd8fb to ad990b2 Compare April 10, 2026 15:48
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 10, 2026

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Apr 10, 2026
@N1ark N1ark force-pushed the generic-float-unops2 branch from ad990b2 to 81ddbbf Compare April 10, 2026 15:50
@rust-log-analyzer

This comment has been minimized.

@N1ark
Copy link
Copy Markdown
Contributor Author

N1ark commented Apr 10, 2026

Ah right so the float functions in core are gated behind core_float_math (#137578); should I then just not document the fact they exist?

@tgross35
Copy link
Copy Markdown
Contributor

The "before" side of the diff used relative paths, would that work to resolve the warning?

@N1ark N1ark force-pushed the generic-float-unops2 branch from 81ddbbf to bc4c70b Compare April 12, 2026 07:58
@rust-log-analyzer

This comment has been minimized.

@N1ark N1ark force-pushed the generic-float-unops2 branch from bc4c70b to 597ecf6 Compare April 12, 2026 17:33
@rust-log-analyzer

This comment has been minimized.

@N1ark N1ark force-pushed the generic-float-unops2 branch from 597ecf6 to da61d47 Compare April 13, 2026 09:54
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-miri failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
tests/pass/shims/x86/rounding-error.rs ... ok
tests/pass/shims/x86/intrinsics-x86-gfni.rs ... ok

FAILED TEST: tests/pass/float_extra_rounding_error.rs (revision `random`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-li6UcP" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/float_extra_rounding_error.rs" "--edition" "2021" "--cfg=random" "-Cextra-filename=random"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
---
   |         ^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::f64::<impl f64>::sin
               at /checkout/library/std/src/num/f64.rs:700:9: 700:30
           1: main
               at tests/pass/float_extra_rounding_error.rs:18:19: 18:42

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
---
   |         ^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::f64::<impl f64>::sin
               at /checkout/library/std/src/num/f64.rs:700:9: 700:30
           1: main
               at tests/pass/float_extra_rounding_error.rs:18:19: 18:42

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
---



FAILED TEST: tests/pass/float_extra_rounding_error.rs (revision `max`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-li6UcP" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/float_extra_rounding_error.rs" "-Zmiri-max-extra-rounding-error" "--edition" "2021" "--cfg=max" "-Cextra-filename=max"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
---
   |         ^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::f64::<impl f64>::sin
               at /checkout/library/std/src/num/f64.rs:700:9: 700:30
           1: main
               at tests/pass/float_extra_rounding_error.rs:18:19: 18:42

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
---
   |         ^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::f64::<impl f64>::sin
               at /checkout/library/std/src/num/f64.rs:700:9: 700:30
           1: main
               at tests/pass/float_extra_rounding_error.rs:18:19: 18:42

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
---



FAILED TEST: tests/pass/float_extra_rounding_error.rs (revision `none`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-li6UcP" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/float_extra_rounding_error.rs" "-Zmiri-no-extra-rounding-error" "--edition" "2021" "--cfg=none" "-Cextra-filename=none"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
---
   |         ^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::f64::<impl f64>::sin
               at /checkout/library/std/src/num/f64.rs:700:9: 700:30
           1: main
               at tests/pass/float_extra_rounding_error.rs:18:19: 18:42

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
---
   |         ^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::f64::<impl f64>::sin
               at /checkout/library/std/src/num/f64.rs:700:9: 700:30
           1: main
               at tests/pass/float_extra_rounding_error.rs:18:19: 18:42

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
---



FAILED TEST: tests/pass/float.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-li6UcP" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/float.rs" "--edition" "2021"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
---
   |         ^^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: core::f16::<impl f16>::sqrt
               at /checkout/library/core/src/num/f16.rs:1914:9: 1914:31
           1: basic
               at tests/pass/float.rs:283:16: 283:29
           2: main
               at tests/pass/float.rs:71:5: 71:12
---
   |         ^^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: core::f16::<impl f16>::sqrt
               at /checkout/library/core/src/num/f16.rs:1914:9: 1914:31
           1: basic
               at tests/pass/float.rs:283:16: 283:29
           2: main
               at tests/pass/float.rs:71:5: 71:12
---



FAILED TEST: tests/pass/integer-ops.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-li6UcP" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/integer-ops.rs" "-Coverflow-checks=off" "--edition" "2021"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
---
   |         ^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::f32::<impl f32>::ln
               at /checkout/library/std/src/num/f32.rs:472:9: 472:30
           1: std::f32::<impl f32>::log
               at /checkout/library/std/src/num/f32.rs:509:9: 509:18
           2: main
               at tests/pass/integer-ops.rs:260:45: 260:65

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
---
   |         ^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::f32::<impl f32>::ln
               at /checkout/library/std/src/num/f32.rs:472:9: 472:30
           1: std::f32::<impl f32>::log
               at /checkout/library/std/src/num/f32.rs:509:9: 509:18
           2: main
               at tests/pass/integer-ops.rs:260:45: 260:65

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
---



FAILED TEST: tests/pass/float_nan.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-li6UcP" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/float_nan.rs" "-Zmiri-provenance-gc=10000" "--edition" "2021"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
---
   |         ^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::f32::<impl f32>::sin
               at /checkout/library/std/src/num/f32.rs:700:9: 700:30
           1: test_f32::{closure#9}
               at tests/pass/float_nan.rs:252:89: 252:98
           2: test_f32
               at tests/pass/float_nan.rs:252:5: 252:100
---
   |         ^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::f32::<impl f32>::sin
               at /checkout/library/std/src/num/f32.rs:700:9: 700:30
           1: test_f32::{closure#9}
               at tests/pass/float_nan.rs:252:89: 252:98
           2: test_f32
               at tests/pass/float_nan.rs:252:5: 252:100
---



FAILED TEST: tests/pass/shims/x86/intrinsics-x86-sse.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-li6UcP" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/shims/x86" "tests/pass/shims/x86/intrinsics-x86-sse.rs" "--edition" "2021"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/shims/x86/intrinsics-x86-sse.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: unimplemented intrinsic: `sqrt`
##[error]  --> /checkout/library/core/src/../../stdarch/crates/core_arch/src/x86/sse.rs:126:33
   |
LL |     unsafe { simd_insert!(a, 0, sqrt(_mm_cvtss_f32(a))) }
   |                                 ^^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::arch::x86_64::_mm_sqrt_ss
---
full stderr:
error: unsupported operation: unimplemented intrinsic: `sqrt`
##[error]  --> /checkout/library/core/src/../../stdarch/crates/core_arch/src/x86/sse.rs:126:33
   |
LL |     unsafe { simd_insert!(a, 0, sqrt(_mm_cvtss_f32(a))) }
   |                                 ^^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::arch::x86_64::_mm_sqrt_ss
---



FAILED TEST: tests/pass/shims/x86/intrinsics-x86-sse2.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-li6UcP" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/shims/x86" "tests/pass/shims/x86/intrinsics-x86-sse2.rs" "--edition" "2021"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/shims/x86/intrinsics-x86-sse2.stderr` to the actual output
+++ <stderr output>
error: unsupported operation: unimplemented intrinsic: `sqrt`
##[error]  --> /checkout/library/core/src/../../stdarch/crates/core_arch/src/x86/sse2.rs:1965:33
   |
LL |     unsafe { simd_insert!(a, 0, sqrt(_mm_cvtsd_f64(b))) }
   |                                 ^^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::arch::x86_64::_mm_sqrt_sd
               at /checkout/library/core/src/../../stdarch/crates/core_arch/src/x86/sse2.rs:1965:33: 1965:55
           1: test_sse2::test_mm_sqrt_sd
               at tests/pass/shims/x86/intrinsics-x86-sse2.rs:375:17: 375:34
           2: test_sse2
               at tests/pass/shims/x86/intrinsics-x86-sse2.rs:378:5: 378:22
           3: main
               at tests/pass/shims/x86/intrinsics-x86-sse2.rs:17:9: 17:20
---
full stderr:
error: unsupported operation: unimplemented intrinsic: `sqrt`
##[error]  --> /checkout/library/core/src/../../stdarch/crates/core_arch/src/x86/sse2.rs:1965:33
   |
LL |     unsafe { simd_insert!(a, 0, sqrt(_mm_cvtsd_f64(b))) }
   |                                 ^^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
   |
   = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
   = note: stack backtrace:
           0: std::arch::x86_64::_mm_sqrt_sd
               at /checkout/library/core/src/../../stdarch/crates/core_arch/src/x86/sse2.rs:1965:33: 1965:55
           1: test_sse2::test_mm_sqrt_sd
               at tests/pass/shims/x86/intrinsics-x86-sse2.rs:375:17: 375:34
           2: test_sse2
               at tests/pass/shims/x86/intrinsics-x86-sse2.rs:378:5: 378:22
           3: main
               at tests/pass/shims/x86/intrinsics-x86-sse2.rs:17:9: 17:20
---
Location:
   /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ui_test-0.30.3/src/lib.rs:365

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: <color_eyre[7f2451e575fa27b]::config::EyreHook>::into_eyre_hook::{closure#0}<unknown>
      at <unknown source file>:<unknown line>
   2: <eyre[55c5dbb691c3ce1f]::Report>::from_adhoc::<&str><unknown>
      at <unknown source file>:<unknown line>
   3: ui_test[5aedb749f72db096]::run_tests_generic::<ui_test[5aedb749f72db096]::default_file_filter, ui[5297912223cc50ee]::run_tests::{closure#1}, alloc[72a1eb237cbc4017]::boxed::Box<dyn ui_test[5aedb749f72db096]::status_emitter::StatusEmitter>><unknown>
      at <unknown source file>:<unknown line>
   4: ui[5297912223cc50ee]::ui<unknown>
      at <unknown source file>:<unknown line>
   5: ui[5297912223cc50ee]::main<unknown>
      at <unknown source file>:<unknown line>
   6: std[75db145fe9db775e]::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core[fe3e968507a7f8c3]::result::Result<(), eyre[55c5dbb691c3ce1f]::Report>, core[fe3e968507a7f8c3]::result::Result<(), eyre[55c5dbb691c3ce1f]::Report>><unknown>
      at <unknown source file>:<unknown line>
   7: std[75db145fe9db775e]::rt::lang_start::<core[fe3e968507a7f8c3]::result::Result<(), eyre[55c5dbb691c3ce1f]::Report>>::{closure#0}<unknown>
      at <unknown source file>:<unknown line>
   8: std[75db145fe9db775e]::rt::lang_start_internal<unknown>
      at <unknown source file>:<unknown line>
   9: main<unknown>
      at <unknown source file>:<unknown line>
  10: __libc_start_main<unknown>
      at <unknown source file>:<unknown line>
  11: _start<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
error: test failed, to rerun pass `--test ui`

Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/ui-5f55c7fc6e037165` (exit status: 1)
Bootstrap failed while executing `test --stage 2 src/tools/miri src/tools/miri/cargo-miri`
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo test -Zwarnings --target x86_64-unknown-linux-gnu -Zbinary-dep-depinfo -j 4 -Zroot-dir=/checkout --locked --color=always --profile=release --manifest-path /checkout/src/tools/miri/Cargo.toml -- [workdir=/checkout]` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:191:21
Executed at: src/bootstrap/src/core/build_steps/test.rs:740:19

--- BACKTRACE vvv
   0: <bootstrap::utils::exec::DeferredCommand>::finish_process
             at /checkout/src/bootstrap/src/utils/exec.rs:939:17
   1: <bootstrap::utils::exec::DeferredCommand>::wait_for_output::<&bootstrap::utils::exec::ExecutionContext>
             at /checkout/src/bootstrap/src/utils/exec.rs:831:21
   2: <bootstrap::utils::exec::ExecutionContext>::run
             at /checkout/src/bootstrap/src/utils/exec.rs:741:45
   3: <bootstrap::utils::exec::BootstrapCommand>::run::<&bootstrap::core::builder::Builder>
             at /checkout/src/bootstrap/src/utils/exec.rs:339:27
   4: <bootstrap::core::build_steps::test::Miri as bootstrap::core::builder::Step>::run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:740:19
   5: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::test::Miri>
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1579:36
   6: <bootstrap::core::build_steps::test::Miri as bootstrap::core::builder::Step>::make_run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:666:21
   7: <bootstrap::core::builder::StepDescription>::maybe_run
             at /checkout/src/bootstrap/src/core/builder/mod.rs:476:13
   8: bootstrap::core::builder::cli_paths::match_paths_to_steps_and_run
             at /checkout/src/bootstrap/src/core/builder/cli_paths.rs:232:18
   9: <bootstrap::core::builder::Builder>::run_step_descriptions
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1122:9
  10: <bootstrap::core::builder::Builder>::execute_cli
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1101:14
  11: <bootstrap::Build>::build
             at /checkout/src/bootstrap/src/lib.rs:799:25
  12: bootstrap::main
             at /checkout/src/bootstrap/src/bin/main.rs:130:11
  13: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/ad726b5063362ec9897ef3d67452fc5606ee70fa/library/core/src/ops/function.rs:250:5
  14: std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /rustc/ad726b5063362ec9897ef3d67452fc5606ee70fa/library/std/src/sys/backtrace.rs:166:18
  15: std::rt::lang_start::<()>::{closure#0}
             at /rustc/ad726b5063362ec9897ef3d67452fc5606ee70fa/library/std/src/rt.rs:206:18
  16: <&dyn core::ops::function::Fn<(), Output = i32> + core::panic::unwind_safe::RefUnwindSafe + core::marker::Sync as core::ops::function::FnOnce<()>>::call_once
             at /rustc/ad726b5063362ec9897ef3d67452fc5606ee70fa/library/core/src/ops/function.rs:287:21
  17: std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<(), Output = i32> + core::panic::unwind_safe::RefUnwindSafe + core::marker::Sync, i32>
             at /rustc/ad726b5063362ec9897ef3d67452fc5606ee70fa/library/std/src/panicking.rs:581:40
  18: std::panicking::catch_unwind::<i32, &dyn core::ops::function::Fn<(), Output = i32> + core::panic::unwind_safe::RefUnwindSafe + core::marker::Sync>
             at /rustc/ad726b5063362ec9897ef3d67452fc5606ee70fa/library/std/src/panicking.rs:544:19
  19: std::panic::catch_unwind::<&dyn core::ops::function::Fn<(), Output = i32> + core::panic::unwind_safe::RefUnwindSafe + core::marker::Sync, i32>
             at /rustc/ad726b5063362ec9897ef3d67452fc5606ee70fa/library/std/src/panic.rs:359:14
  20: std::rt::lang_start_internal::{closure#0}
             at /rustc/ad726b5063362ec9897ef3d67452fc5606ee70fa/library/std/src/rt.rs:175:24
  21: std::panicking::catch_unwind::do_call::<std::rt::lang_start_internal::{closure#0}, isize>
             at /rustc/ad726b5063362ec9897ef3d67452fc5606ee70fa/library/std/src/panicking.rs:581:40
---
  28: __libc_start_main
  29: _start


Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:46:55
  local time: Mon Apr 13 10:44:23 UTC 2026
  network time: Mon, 13 Apr 2026 10:44:23 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 14, 2026

☔ The latest upstream changes (presumably #155292) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants