Skip to content

Conversation

@CrooseGit
Copy link

Previously, the CI has only been running the tests for the arm intrinsic in release mode.
When the CI is modified to fix this, it is discovered that the tests do not build in debug for arm targets.

This PR amends the CI, test tool, and the intrinsics themselves to address the above issues.

@rustbot
Copy link
Collaborator

rustbot commented Oct 28, 2025

r? @Amanieu

rustbot has assigned @Amanieu.
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

This fixes build issues associated with failing LLVM const param assertions
@CrooseGit CrooseGit force-pushed the dev/reucru01/fix-debug-tests branch from b1633ae to 0ec44c2 Compare October 29, 2025 10:19
@CrooseGit CrooseGit force-pushed the dev/reucru01/fix-debug-tests branch from 0ec44c2 to d15e102 Compare October 29, 2025 10:50
Copy link
Contributor

@folkertdev folkertdev left a comment

Choose a reason for hiding this comment

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

Can you give some background on why the tests did not pass in debug mode? I'd also personally like to merge the changes to the intrinsics separately from changes to the CI infrastructure

Comment on lines -86 to +92
cargo run "${INTRINSIC_TEST}" "${PROFILE}" \
cargo run "${INTRINSIC_TEST}" --release \
--bin intrinsic-test -- intrinsics_data/arm_intrinsics.json \
--runner "${TEST_RUNNER}" \
--cppcompiler "${TEST_CXX_COMPILER}" \
--skip "${TEST_SKIP_INTRINSICS}" \
--target "${TARGET}"
--target "${TARGET}" \
--profile "${PROFILE}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Combining both --release and --profile looks suspicious. What does that do?

Copy link
Author

@CrooseGit CrooseGit Oct 31, 2025

Choose a reason for hiding this comment

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

Fair point, it not obvious.
It runs the intrinsic test tool itself in release mode, and then passes the $PROFILE env-var as an argument to the tool. The tool then compiles and runs a series of rust test programs with the specified profile, comparing the outputs against the equivalent C programs.
I could add a comment explaining this?
Thanks

Comment on lines +28 to +31
let profile_dir = match profile {
"dev" => "debug",
_ => "release",
};
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should explicitly match release here and just panic on anything else to make future debugging easier.

Copy link
Author

Choose a reason for hiding this comment

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

That makes sense, will do.
Thanks

@CrooseGit
Copy link
Author

CrooseGit commented Oct 31, 2025

@folkertdev

Can you give some background on why the tests did not pass in debug mode? I'd also personally like to merge the changes to the intrinsics separately from changes to the CI infrastructure

The offending intrinsics were passing arguments to the linked llvm intrinsics that were then failing LLVMs internal assertions. LLVM requires certain arguments to be const for some of its intrinsics, and in debug mode these arguments were not const. However, in release due to things being inlined and / or being optimised away the relevant arguments became const anyway.
RE separate PRs, that can be arranged. Currently I am trying to fix the big endian CI failures, but once that is sorted, then will do.
Thanks

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants