-
Notifications
You must be signed in to change notification settings - Fork 14
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
getelementptr
turns into add
turns into or
due to wrong alignment setting
#63
Comments
This seems to be caused because the Good:
Bad:
|
Is it because in the good case,
|
My current working theory is that the real problem is that the
but then, before we do that
I think that subtraction (effectively, an increment by 1) causes |
I've now confirmed with a debugger that So it seems there's some other transformation that breaks LLVM's initial assumption that |
I think I've tracked this down to |
…nt for everything else. (avr-rust/rust-legacy-fork#63)
getelementptr
turns into add
turns into or
due to wrong alignment setting
…nt for everything else. (avr-rust/rust-legacy-fork#63)
(avr-rust/rust-legacy-fork#63 avr-rust/rust-legacy-fork#64) [AVR] Use 1-byte alignment for all data types (avr-rust/rust-legacy-fork#64)
…nt for everything else. (avr-rust/rust-legacy-fork#63)
(avr-rust/rust-legacy-fork#63 avr-rust/rust-legacy-fork#64) [AVR] Use 1-byte alignment for all data types (avr-rust/rust-legacy-fork#64)
LLVM IR:
This dereferences the wrong address when setting
%v6
. If I remove thebr label %bb4
and replace it with just a fallthrough, then the right address is loaded into%v6
.Wrong assembly:
Correct assembly, when the
br label %bb4
is removed:The text was updated successfully, but these errors were encountered: