-
Notifications
You must be signed in to change notification settings - Fork 14
[LLVM 8.0] Assertion failed: Trying to add an operand to a machine instr that is already done! #112
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
Comments
The issue is here: https://github.com/llvm-mirror/llvm/blob/master/lib/Target/AVR/AVRRegisterInfo.cpp#L152-L154 if (MI.getOpcode() == AVR::FRMIDX) {
MI.setDesc(TII.get(AVR::MOVWRdRr));
MI.getOperand(FIOperandNum).ChangeToRegister(AVR::R29R28, false); The |
Adding an With this patch (and all the others I commented on) applied, I can now compile stock |
So |
That's exactly what it means! 😄 (at least if "work" means "compiles", I wouldn't bet on it actually being compiled bug-free yet). |
Is opt-level 1 the default of Cargo for anything? |
I don't think so.
I think so. Although if we also upgrade to the latest (Also, I'm gonna see if I can figure something out about the "ran out of registers" thing as well). |
I don't know about need — that's not something that we currently support in AVR land anyway, right? |
That is, that's why #84 is open, right? |
Actually, if we upgrade to LLVM 8.0 (which is what the current |
Note that we don't need all of rust-lang#51576. However, since a recent LLVM commit the address space of program data (and thus functions and function pointers) is defined to be |
If I'm reading correctly, neither of those PRs would allow for a user to annotate "things" to specifically be in a given address space? |
At least my PR does not. I don't know about the other one, but I don't think so. |
@shepmaster FYI: I've opened #115 with my current set of changes (although I'm still verifying that I didn't mess anything up while rebasing things). |
Also raised LLVM bug PR39554 to track writing of proper unit tests for |
Thanks for the patch @TimNN! |
The following IR was obtained by compiling libcore with
-C opt-level=1
to IR and then minimizing. The LLVM version is from a recent rust-lang/rust commit with some patches to work around other issues.Compile with
llc -O1
to reproduce.Output:
The text was updated successfully, but these errors were encountered: