Skip to content

Only use read_unaligned in transmute_copy if necessary - #71446

Merged
bors merged 1 commit into
rust-lang:masterfrom
Amanieu:transmute_copy
Apr 23, 2020
Merged

Only use read_unaligned in transmute_copy if necessary#71446
bors merged 1 commit into
rust-lang:masterfrom
Amanieu:transmute_copy

Conversation

@Amanieu

Copy link
Copy Markdown
Member

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

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @sfackler

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

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

Copy link
Copy Markdown
Member

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

@bors r+ rollup

@bors

bors commented Apr 23, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 99de372 has been approved by sfackler

@borsbors 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.
@JohnTitorJohnTitor mentioned this pull request Apr 23, 2020
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:masterApr 23, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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

@Amanieu@rust-highfive@sfackler@bors