Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix LLVM assert with write_volatile #32233

Merged
merged 1 commit into from
Mar 14, 2016
Merged

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Mar 13, 2016

Fixes #29663

let val = if type_is_immediate(bcx.ccx(), tp_ty) {
from_arg_ty(bcx, llargs[1], tp_ty)
} else {
Load(bcx, from_arg_ty(bcx, llargs[1], tp_ty))
Copy link
Member

Choose a reason for hiding this comment

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

You don't need to transform llargs[1], if it's not immediate then it's a pointer to the value you want (Load wouldn't work otherwise anyway).

Copy link
Member Author

Choose a reason for hiding this comment

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

llargs[1] is the value that needs to be stored. llargs[0] is the pointer to the store destination.

Copy link
Member

Choose a reason for hiding this comment

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

If not immediate, then it's passed indirectly and llargs[1] is a pointer to the value that needs to be stored.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh nevermind, I see what the problem is.

@eddyb
Copy link
Member

eddyb commented Mar 13, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Mar 13, 2016

📌 Commit 86fd5a0 has been approved by eddyb

@bors
Copy link
Contributor

bors commented Mar 14, 2016

⌛ Testing commit 86fd5a0 with merge d19f1b6...

bors added a commit that referenced this pull request Mar 14, 2016
Fix LLVM assert with write_volatile

Fixes #29663
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.

None yet

3 participants