Skip to content

Conversation

sayantn
Copy link
Contributor

@sayantn sayantn commented Sep 15, 2025

Ported the implementation of most SIMD intrinsics from Miri to rustc_const_eval. Remaining are

  • Math functions
  • FMA
  • Funnel Shifts
  • Unordered reduction intrinsics

@rustbot
Copy link
Collaborator

rustbot commented Sep 15, 2025

Some changes occurred to the platform-builtins intrinsics. Make sure the
LLVM backend as well as portable-simd gets adapted for the changes.

cc @antoyo, @GuillaumeGomez, @bjorn3, @calebzulawski, @programmerjake

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 Sep 15, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 15, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented Sep 15, 2025

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

}

fn main() {
const X2: i32x2 = i32x2::from_array([20, 21]);
Copy link
Member

Choose a reason for hiding this comment

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

please add checks for length 3 and 6 since portable-simd wants to support non-powers-of-2. length 3 since it's odd and length 6 because it's the smallest where the simd type's alignment is not equal to either the simd type's size or to the element's size.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I also add these to the tests/ui/simd file, I just copied the test cases from there?

Copy link
Member

Choose a reason for hiding this comment

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

sure if you like. I mostly just figured while you're writing the code is a good time to add it to the code you're changing. I'll leave it up to the const-eval people to decide if they want it everywhere. shuffles do get a bunch of testing in portable-simd for miri (and normal compilation), but we don't explicitly test const-eval shuffles in portable-simd because they didn't exist yet.

Copy link
Member

Choose a reason for hiding this comment

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

Miri and const-eval will use the same implementation so in principle it is covered.

Instead of duplicating tests we usually prefer making the existing tests run both inside and outside consts. We have some infrastructure for that in the std test suite -- is there a reason this has to be a ui test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Idts, this should be in coretests, but the tests for simd_insert and simd_extract was in this directory so I just put these there. I will port these to coretests

Copy link
Member

Choose a reason for hiding this comment

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

Yeah many old tests haven't been moved to the proper place yet, which would be library/coretests/tests/floats/mod.rs. But we shouldn't be adding new such tests if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have moved all the tests to coretests, and enabled const-eval tests for them

Copy link
Member

@RalfJung RalfJung Sep 15, 2025

Choose a reason for hiding this comment

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

If you plan to add more SIMD intrinsics, then please start putting them in a new file (intrinsics/simd.rs) to avoid this file growing too big. (You can make this part a separate follow-up PR if you prefer.)

Copy link
Contributor Author

@sayantn sayantn Sep 15, 2025

Choose a reason for hiding this comment

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

In that case, as all intrinsics are already implemented in miri, can we just port all of them to const_eval? Is there a reason most SIMD intrinsic implementations are in miri but not in const_eval, afaiu they use the same ctfe machinery

Edit: or at least the ones that don't use floats

Copy link
Member

Choose a reason for hiding this comment

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

Yeah we could port them all. They are only in Miri because so far we didn't attempt to support them in const.

Floats are allowed in consts so even those can be moved over. However, sin/cos/... should not be available in const.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also noticed that the FMA implementation has a nondeterministic component, what should I do when porting it? const-eval shouldn't have any nondeterminism, but in that case what implementation should we use - a * b + c or a.mul_add(b, c)?

Copy link
Member

Choose a reason for hiding this comment

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

I think we should leave anything that has any questions about it for future PRs. indeed I am not certain that what Ralf said was meant to suggest increasing the scope of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These were fairly trivial to port, so I guess I will limit this PR to these, the few remaining ones can be done later

Copy link
Member

Choose a reason for hiding this comment

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

Yeah let's hold off on the FMA one for now.

@RalfJung
Copy link
Member

Make simd_shuffle usable in const-contexts (I am also working on other simd intrinsics, but want to get this one over fast because a stdarch PR depends on it)

Which PR is that? Always good to cross-reference things. :) Or if the PR doesn't exist yet, what are your stdarch plans that need this?

@sayantn
Copy link
Contributor Author

sayantn commented Sep 15, 2025

I want to make some stdarch functions available on const-contexts (for now, we are doing mostly constructors, but the _mm_set1 constructors use simd_shuffle, hence this. For some reason a simple Type([value; N]) doesn't optimize in darwin and ios (see #60637 (comment))

@workingjubilee
Copy link
Member

I think we discussed creating a simd_splat intrinsic of some kind for simple initialization of vectors because it would optimize better.

@workingjubilee
Copy link
Member

workingjubilee commented Sep 15, 2025

Also I know I mentioned it but please do not get into introducing such a new intrinsic here (a new PR, maybe!), as there are other good reasons to make this const so that we don't have to haggle over the many possible reasons (it is a truth universally acknowledged that std::arch is... a tad big) someone might want to use the simd_shuffle operation in their runtime API yet also const-evaluate it. At const time it's just boring operations on an array, after all, and you can already do that.

@workingjubilee
Copy link
Member

Anyways, that aside, I'm basically good with this so it's mostly going to be haggling with Ralf, so

r? RalfJung

@rustbot rustbot assigned RalfJung and unassigned workingjubilee Sep 15, 2025
…ation to rustc_const_eval)

Remaining: Math functions (`fsqrt`, `fsin`, `fcos`, `fexp`, `fexp2`, `flog`, `flog2`, `flog10`),  Funnel Shifts, `dyn` extract-inserts and FMA
@rustbot
Copy link
Collaborator

rustbot commented Sep 15, 2025

The Miri subtree was changed

cc @rust-lang/miri

@sayantn sayantn changed the title Implement simd_shuffle in const_eval Implement most SIMD intrinsics in const-eval Sep 15, 2025
Comment on lines 36 to 45
pub const fn from_array(a: [T; N]) -> Self {
Simd(a)
}

pub const fn splat(value: T) -> Self
where
T: Copy,
{
Self([value; N])
}
Copy link
Member

@programmerjake programmerjake Sep 16, 2025

Choose a reason for hiding this comment

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

you need to use mem::transmute instead of accessing the field inside a repr(simd) struct, since last I knew the compiler doesn't properly handle the field accesses in all cases

Suggested change
pub const fn from_array(a: [T; N]) -> Self {
Simd(a)
}
pub const fn splat(value: T) -> Self
where
T: Copy,
{
Self([value; N])
}
pub const fn from_array(a: [T; N]) -> Self {
// Safety: same shape
unsafe { mem::transmute(a) }
}
pub const fn splat(value: T) -> Self
where
T: Copy,
{
// Safety: same shape
unsafe { mem::transmute([value; N]) }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

afaik constructing them is fine, projecting is the problematic part

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] alloctests test:true 13.252
error: Unknown SIMD intrinsic simd_funnel_shl
##[error]   --> coretests/tests/simd_intrinsics.rs:232:13
    |
232 |             simd_funnel_shl(x1, x2, x1),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: Unknown SIMD intrinsic simd_funnel_shl
##[error]   --> coretests/tests/simd_intrinsics.rs:241:13
    |
241 |             simd_funnel_shl(x2, x1, x1),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: Unknown SIMD intrinsic simd_funnel_shl
##[error]   --> coretests/tests/simd_intrinsics.rs:250:13
    |
250 |             simd_funnel_shl(y1, y2, y1),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: Unknown SIMD intrinsic simd_funnel_shl
##[error]   --> coretests/tests/simd_intrinsics.rs:259:13
    |
259 |             simd_funnel_shl(y2, y1, y1),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: Unknown SIMD intrinsic simd_funnel_shr
##[error]   --> coretests/tests/simd_intrinsics.rs:269:13
    |
269 |             simd_funnel_shr(x1, x2, x1),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: Unknown SIMD intrinsic simd_funnel_shr
##[error]   --> coretests/tests/simd_intrinsics.rs:278:13
    |
278 |             simd_funnel_shr(x2, x1, x1),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: Unknown SIMD intrinsic simd_funnel_shr
##[error]   --> coretests/tests/simd_intrinsics.rs:287:13
    |
287 |             simd_funnel_shr(y1, y2, y1),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: Unknown SIMD intrinsic simd_funnel_shr
##[error]   --> coretests/tests/simd_intrinsics.rs:296:13
    |
296 |             simd_funnel_shr(y2, y1, y1),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: invalid monomorphization of `simd_bitmask` intrinsic: cannot return `u16`, expected `u10` or `[u8; 2]`
##[error]    --> coretests/tests/simd_intrinsics.rs:1426:33
     |
1426 |             let bitmask1: u16 = simd_bitmask(mask);
     |                                 ^^^^^^^^^^^^^^^^^^

terminator _10 = std::intrinsics::simd::simd_bitmask::<simd_intrinsics::Simd<i32, 10>, u16>(copy _1) -> [return: bb2, unwind unreachable]
fn simd_intrinsics::select_bitmask_notpow2() -> () {
    let mut _0: ();
    let _1: simd_intrinsics::Simd<i32, 10>;
    let mut _2: [i32; 10];
    let mut _3: i32;
    let mut _4: i32;
    let mut _5: i32;
    let mut _6: i32;
    let mut _7: i32;
    let mut _12: bool;
    let mut _13: !;
    let mut _14: bool;
    let mut _15: &[u8; 2];
    let mut _16: &[u8; 2];
---
    let mut _23: simd_intrinsics::Simd<i32, 10>;
    let mut _24: i32;
    let mut _25: simd_intrinsics::Simd<i32, 10>;
    let mut _26: bool;
    let mut _27: &simd_intrinsics::Simd<i32, 10>;
    let mut _28: &simd_intrinsics::Simd<i32, 10>;
    let mut _29: !;
    let mut _30: bool;
    let mut _31: &simd_intrinsics::Simd<i32, 10>;
    let mut _32: &simd_intrinsics::Simd<i32, 10>;
    let mut _33: !;
    let _34: simd_intrinsics::Simd<i32, 20>;
    let mut _35: [i32; 20];
    let mut _36: i32;
    let mut _37: i32;
    let mut _38: i32;
    let mut _39: i32;
    let mut _40: i32;
    let mut _41: i32;
    let mut _42: i32;
    let mut _43: i32;
    let mut _44: i32;
    let mut _45: i32;
    let mut _46: i32;
    let mut _47: i32;
    let mut _52: bool;
    let mut _53: !;
    let mut _54: bool;
    let mut _55: &[u8; 3];
    let mut _56: &[u8; 3];
---
    let mut _63: simd_intrinsics::Simd<i32, 20>;
    let mut _64: i32;
    let mut _65: simd_intrinsics::Simd<i32, 20>;
    let mut _66: bool;
    let mut _67: &simd_intrinsics::Simd<i32, 20>;
    let mut _68: &simd_intrinsics::Simd<i32, 20>;
    let mut _69: !;
    let mut _70: bool;
    let mut _71: &simd_intrinsics::Simd<i32, 20>;
    let mut _72: &simd_intrinsics::Simd<i32, 20>;
    let mut _73: !;
    scope 1 {
        debug mask => _1;
        let _8: u16;
        scope 2 {
            debug mask_bits => _8;
            let _9: [u8; 2];
            scope 3 {
                debug mask_bytes => _9;
                let _10: u16;
                scope 4 {
                    debug bitmask1 => _10;
                    let _11: [u8; 2];
                    scope 5 {
                        debug bitmask2 => _11;
                        let _18: simd_intrinsics::Simd<i32, 10>;
                        scope 6 {
                            debug selected1 => _18;
                            let _22: simd_intrinsics::Simd<i32, 10>;
                            scope 7 {
                                debug selected2 => _22;
                            }
                        }
                    }
                }
            }
---
            }
        }
    }

    bb0: {
        _3 = Not(const 0_i32);
        _4 = Not(const 0_i32);
        _5 = Not(const 0_i32);
        _6 = Not(const 0_i32);
        _7 = Not(const 0_i32);
        _2 = [move _3, move _4, const 0_i32, move _5, const 0_i32, const 0_i32, move _6, const 0_i32, move _7, const 0_i32];
        _1 = simd_intrinsics::Simd::<i32, 10>::from_array(move _2) -> [return: bb1, unwind unreachable];
    }

    bb1: {
        _8 = const 331_u16;
        _9 = [const 75_u8, const 1_u8];
        _10 = std::intrinsics::simd::simd_bitmask::<simd_intrinsics::Simd<i32, 10>, u16>(copy _1) -> [return: bb2, unwind unreachable];
    }

    bb2: {
        _11 = std::intrinsics::simd::simd_bitmask::<simd_intrinsics::Simd<i32, 10>, [u8; 2]>(copy _1) -> [return: bb3, unwind unreachable];
    }

    bb3: {
        _12 = Eq(copy _8, copy _10);
        switchInt(move _12) -> [0: bb5, otherwise: bb4];
    }

    bb4: {
        _15 = &_9;
        _16 = &_11;
        _14 = <[u8; 2] as std::cmp::PartialEq>::eq(move _15, move _16) -> [return: bb6, unwind unreachable];
    }

    bb5: {
        _13 = core::panicking::panic(const "assertion failed: mask_bits == bitmask1") -> unwind unreachable;
    }

    bb6: {
        switchInt(move _14) -> [0: bb8, otherwise: bb7];
    }

    bb7: {
        _20 = Not(const 0_i32);
        _19 = simd_intrinsics::Simd::<i32, 10>::splat(move _20) -> [return: bb9, unwind unreachable];
    }

    bb8: {
        _17 = core::panicking::panic(const "assertion failed: mask_bytes == bitmask2") -> unwind unreachable;
    }

    bb9: {
        _21 = simd_intrinsics::Simd::<i32, 10>::splat(const 0_i32) -> [return: bb10, unwind unreachable];
    }

    bb10: {
        _18 = std::intrinsics::simd::simd_select_bitmask::<u16, simd_intrinsics::Simd<i32, 10>>(copy _8, move _19, move _21) -> [return: bb11, unwind unreachable];
    }

    bb11: {
        _24 = Not(const 0_i32);
        _23 = simd_intrinsics::Simd::<i32, 10>::splat(move _24) -> [return: bb12, unwind unreachable];
    }

    bb12: {
        _25 = simd_intrinsics::Simd::<i32, 10>::splat(const 0_i32) -> [return: bb13, unwind unreachable];
    }

    bb13: {
        _22 = std::intrinsics::simd::simd_select_bitmask::<[u8; 2], simd_intrinsics::Simd<i32, 10>>(copy _9, move _23, move _25) -> [return: bb14, unwind unreachable];
    }

    bb14: {
        _27 = &_1;
        _28 = &_18;
        _26 = <simd_intrinsics::Simd<i32, 10> as std::cmp::PartialEq>::eq(move _27, move _28) -> [return: bb15, unwind unreachable];
    }

    bb15: {
        switchInt(move _26) -> [0: bb17, otherwise: bb16];
    }

    bb16: {
        _31 = &_1;
        _32 = &_22;
        _30 = <simd_intrinsics::Simd<i32, 10> as std::cmp::PartialEq>::eq(move _31, move _32) -> [return: bb18, unwind unreachable];
    }

    bb17: {
        _29 = core::panicking::panic(const "assertion failed: mask == selected1") -> unwind unreachable;
    }

    bb18: {
        switchInt(move _30) -> [0: bb20, otherwise: bb19];
    }

    bb19: {
        _36 = Not(const 0_i32);
        _37 = Not(const 0_i32);
        _38 = Not(const 0_i32);
        _39 = Not(const 0_i32);
        _40 = Not(const 0_i32);
        _41 = Not(const 0_i32);
        _42 = Not(const 0_i32);
        _43 = Not(const 0_i32);
        _44 = Not(const 0_i32);
        _45 = Not(const 0_i32);
        _46 = Not(const 0_i32);
        _47 = Not(const 0_i32);
        _35 = [move _36, move _37, const 0_i32, move _38, const 0_i32, const 0_i32, move _39, const 0_i32, move _40, const 0_i32, const 0_i32, const 0_i32, const 0_i32, move _41, move _42, move _43, move _44, move _45, move _46, move _47];
        _34 = simd_intrinsics::Simd::<i32, 20>::from_array(move _35) -> [return: bb21, unwind unreachable];
    }

    bb20: {
        _33 = core::panicking::panic(const "assertion failed: mask == selected2") -> unwind unreachable;
    }

    bb21: {
        _48 = const 1040715_u32;
        _49 = [const 75_u8, const 225_u8, const 15_u8];
        _50 = std::intrinsics::simd::simd_bitmask::<simd_intrinsics::Simd<i32, 20>, u32>(copy _34) -> [return: bb22, unwind unreachable];
    }

    bb22: {
        _51 = std::intrinsics::simd::simd_bitmask::<simd_intrinsics::Simd<i32, 20>, [u8; 3]>(copy _34) -> [return: bb23, unwind unreachable];
    }

    bb23: {
        _52 = Eq(copy _48, copy _50);
        switchInt(move _52) -> [0: bb25, otherwise: bb24];
    }

    bb24: {
        _55 = &_49;
        _56 = &_51;
        _54 = <[u8; 3] as std::cmp::PartialEq>::eq(move _55, move _56) -> [return: bb26, unwind unreachable];
    }

    bb25: {
        _53 = core::panicking::panic(const "assertion failed: mask_bits == bitmask1") -> unwind unreachable;
    }

    bb26: {
        switchInt(move _54) -> [0: bb28, otherwise: bb27];
    }

    bb27: {
        _60 = Not(const 0_i32);
        _59 = simd_intrinsics::Simd::<i32, 20>::splat(move _60) -> [return: bb29, unwind unreachable];
    }

    bb28: {
        _57 = core::panicking::panic(const "assertion failed: mask_bytes == bitmask2") -> unwind unreachable;
    }

    bb29: {
        _61 = simd_intrinsics::Simd::<i32, 20>::splat(const 0_i32) -> [return: bb30, unwind unreachable];
    }

    bb30: {
        _58 = std::intrinsics::simd::simd_select_bitmask::<u32, simd_intrinsics::Simd<i32, 20>>(copy _48, move _59, move _61) -> [return: bb31, unwind unreachable];
    }

    bb31: {
        _64 = Not(const 0_i32);
        _63 = simd_intrinsics::Simd::<i32, 20>::splat(move _64) -> [return: bb32, unwind unreachable];
    }

    bb32: {
        _65 = simd_intrinsics::Simd::<i32, 20>::splat(const 0_i32) -> [return: bb33, unwind unreachable];
    }

    bb33: {
        _62 = std::intrinsics::simd::simd_select_bitmask::<[u8; 3], simd_intrinsics::Simd<i32, 20>>(copy _49, move _63, move _65) -> [return: bb34, unwind unreachable];
    }

    bb34: {
        _67 = &_34;
        _68 = &_58;
        _66 = <simd_intrinsics::Simd<i32, 20> as std::cmp::PartialEq>::eq(move _67, move _68) -> [return: bb35, unwind unreachable];
    }

    bb35: {
        switchInt(move _66) -> [0: bb37, otherwise: bb36];
    }

    bb36: {
        _71 = &_34;
        _72 = &_62;
        _70 = <simd_intrinsics::Simd<i32, 20> as std::cmp::PartialEq>::eq(move _71, move _72) -> [return: bb38, unwind unreachable];
    }

    bb37: {
        _69 = core::panicking::panic(const "assertion failed: mask == selected1") -> unwind unreachable;
    }

    bb38: {
        switchInt(move _70) -> [0: bb40, otherwise: bb39];
    }

    bb39: {
        return;
    }

    bb40: {
        _73 = core::panicking::panic(const "assertion failed: mask == selected2") -> unwind unreachable;
    }
}

alloc46764 (size: 35, align: 1) {
    0x00 │ 61 73 73 65 72 74 69 6f 6e 20 66 61 69 6c 65 64 │ assertion failed
    0x10 │ 3a 20 6d 61 73 6b 20 3d 3d 20 73 65 6c 65 63 74 │ : mask == select
    0x20 │ 65 64 32                                        │ ed2
}

alloc46763 (size: 35, align: 1) {
    0x00 │ 61 73 73 65 72 74 69 6f 6e 20 66 61 69 6c 65 64 │ assertion failed
    0x10 │ 3a 20 6d 61 73 6b 20 3d 3d 20 73 65 6c 65 63 74 │ : mask == select
    0x20 │ 65 64 31                                        │ ed1
}

alloc46762 (size: 40, align: 1) {
    0x00 │ 61 73 73 65 72 74 69 6f 6e 20 66 61 69 6c 65 64 │ assertion failed
    0x10 │ 3a 20 6d 61 73 6b 5f 62 79 74 65 73 20 3d 3d 20 │ : mask_bytes == 
    0x20 │ 62 69 74 6d 61 73 6b 32                         │ bitmask2
}

alloc46761 (size: 39, align: 1) {
    0x00 │ 61 73 73 65 72 74 69 6f 6e 20 66 61 69 6c 65 64 │ assertion failed
    0x10 │ 3a 20 6d 61 73 6b 5f 62 69 74 73 20 3d 3d 20 62 │ : mask_bits == b
    0x20 │ 69 74 6d 61 73 6b 31                            │ itmask1
}

[RUSTC-TIMING] coretests test:true 66.106
error: could not compile `coretests` (test "coretests") due to 9 previous errors
env -u RUSTC_WRAPPER CARGO_ENCODED_RUSTDOCFLAGS="-Csymbol-mangling-version=v0\u{1f}-Zrandomize-layout\u{1f}-Zunstable-options\u{1f}--check-cfg=cfg(bootstrap)\u{1f}--check-cfg=cfg(llvm_enzyme)\u{1f}-Dwarnings\u{1f}-Wrustdoc::invalid_codeblock_attributes\u{1f}--crate-version\u{1f}1.92.0-nightly\t(b885b0e9b\t2025-09-16)" CARGO_ENCODED_RUSTFLAGS="-Csymbol-mangling-version=v0\u{1f}-Zrandomize-layout\u{1f}-Zunstable-options\u{1f}--check-cfg=cfg(bootstrap)\u{1f}--check-cfg=cfg(llvm_enzyme)\u{1f}-Zmacro-backtrace\u{1f}-Csplit-debuginfo=off\u{1f}-Clink-arg=-L/usr/lib/llvm-19/lib\u{1f}-Cllvm-args=-import-instr-limit=10\u{1f}-Clink-args=-Wl,-z,origin\u{1f}-Clink-args=-Wl,-rpath,$ORIGIN/../lib\u{1f}-Alinker-messages\u{1f}--cap-lints=allow\u{1f}--cfg\u{1f}randomized_layouts" RUSTC="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-codegen/cg_clif/dist/rustc-clif" RUSTDOC="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-codegen/cg_clif/dist/rustdoc-clif" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage0/bin/cargo" "test" "--manifest-path" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-codegen/cg_clif/build/sysroot_tests/Cargo.toml" "--target-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-codegen/cg_clif/build/sysroot_tests_target" "--locked" "--target" "aarch64-unknown-linux-gnu" "-p" "coretests" "-p" "alloctests" "--tests" "--" "-q" exited with status ExitStatus(unix_wait_status(25856))
Bootstrap failed while executing `--stage 2 test --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest`
Command `/checkout/obj/build/aarch64-unknown-linux-gnu/stage0/bin/cargo run --target aarch64-unknown-linux-gnu -Zbinary-dep-depinfo -j 4 -Zroot-dir=/checkout --locked --color always --release --manifest-path /checkout/compiler/rustc_codegen_cranelift/build_system/Cargo.toml -- test --download-dir /checkout/obj/build/cg_clif_download --out-dir /checkout/obj/build/aarch64-unknown-linux-gnu/stage2-codegen/cg_clif --no-unstable-features --use-backend cranelift --sysroot llvm --skip-test testsuite.extended_sysroot [workdir=/checkout/compiler/rustc_codegen_cranelift]` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/test.rs:3662:25
Executed at: src/bootstrap/src/core/build_steps/test.rs:3707:26

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:26:14
  local time: Tue Sep 16 06:27:53 UTC 2025
  network time: Tue, 16 Sep 2025 06:27:53 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.

7 participants