Skip to content

Only use read_unaligned in transmute_copy if necessary #71446

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Apr 22, 2020

I've noticed that this causes LLVM to generate poor code on targets that don't support unaligned memory accesses.

@rust-highfive
Copy link
Contributor

r? @sfackler

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 22, 2020
@sfackler
Copy link
Member

A bit unfortunate that this optimization can't happen automatically but oh well.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 23, 2020

📌 Commit 99de372 has been approved by sfackler

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 23, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Apr 23, 2020
Only use read_unaligned in transmute_copy if necessary

I've noticed that this causes LLVM to generate poor code on targets that don't support unaligned memory accesses.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2020
Rollup of 7 pull requests

Successful merges:

 - rust-lang#70633 (Confusing suggestion on incorrect closing `}`)
 - rust-lang#71404 (Don't fuse Chain in its second iterator)
 - rust-lang#71408 (Check code blocks tags)
 - rust-lang#71442 (Add a "by reference" adaptor for `AllocRef`)
 - rust-lang#71446 (Only use read_unaligned in transmute_copy if necessary)
 - rust-lang#71470 (Fix doc links)
 - rust-lang#71479 (add back Scalar::null_ptr)

Failed merges:

r? @ghost
@bors bors merged commit 199f4de into rust-lang:master Apr 23, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants