Skip to content

Conversation

durin42
Copy link
Contributor

@durin42 durin42 commented Oct 21, 2025

This was a bit more invasive than I had kind of hoped. An alternate approach would be to add an extra call_intrinsic_with_attrs() that would have the new-in-this-change signature for call_intrinsic, but this felt about equivalent and made it a little easier to audit the relevant callsites of call_intrinsic().

Related LLVM change is llvm/llvm-project#163802.

@rustbot label llvm-main

… alignment as an attribute

This was a bit more invasive than I had kind of hoped. An alternate
approach would be to add an extra call_intrinsic_with_attrs() that would
have the new-in-this-change signature for call_intrinsic, but this felt
about equivalent and made it a little easier to audit the relevant
callsites of call_intrinsic().
@rustbot
Copy link
Collaborator

rustbot commented Oct 21, 2025

r? @lcnr

rustbot has assigned @lcnr.
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 rustbot added 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 21, 2025
@rust-log-analyzer
Copy link
Collaborator

The job tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
fmt: checked 6502 files
tidy check
tidy [rustdoc_json (src)]: `rustdoc-json-types` modified, checking format version
tidy: Skipping binary file check, read-only filesystem
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs:24: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs:25: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs:38: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs:39: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs:52: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs:53: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs:30: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs:31: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs:44: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs:45: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs:58: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs:59: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs:26: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs:27: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs:36: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs:37: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs:50: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs:51: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs:24: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs:34: line longer than 100 chars
tidy [style (tests)]: /checkout/tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs:44: line longer than 100 chars
tidy [style (tests)]: FAIL
removing old virtual environment
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'venv'
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'virtualenv'
Requirement already satisfied: pip in ./build/venv/lib/python3.10/site-packages (25.2)
linting python files
---
info: ES-Check: there were no ES version matching errors!  🎉
typechecking javascript files
tidy: The following check failed: style (tests)
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/rust-tidy /checkout /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo /checkout/obj/build 4 /node/bin/npm --extra-checks=py,cpp,js,spellcheck` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1549:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:1280:29

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:03:25
  local time: Tue Oct 21 21:32:41 UTC 2025
  network time: Tue, 21 Oct 2025 21:32:41 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

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

The alignment in CodegenFnAttrs is the function alignment -- setting that on an intrinsic call does not make sense. The attribute needs to be set on the argument, not the function.

View changes since this review

@durin42
Copy link
Contributor Author

durin42 commented Oct 21, 2025

@rustbot label llvm-main

@durin42 durin42 added the llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) label Oct 21, 2025
@durin42
Copy link
Contributor Author

durin42 commented Oct 21, 2025

The alignment in CodegenFnAttrs is the function alignment -- setting that on an intrinsic call does not make sense. The attribute needs to be set on the argument, not the function.

View changes since this review

Crud, alright. I'll take a fresh crack at this tomorrow or Thursday then, unless someone else beats me to it.

@rustbot label +S-waiting-on-author -S-waiting-on-review

@durin42
Copy link
Contributor Author

durin42 commented Oct 21, 2025

Do I need to use rustc_codegen_llvm::attributes::apply_to_callsite on the return value of bx.call_intrinsic()?

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. llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants