-
Notifications
You must be signed in to change notification settings - Fork 13.3k
LLVM assertion when compiling core
for the MSP430 architecture
#37829
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
We've wondered from time to time whether to turn LLVM assertions on during development, but most of the time we conclude "no" as it slows down builds and it's quite rare for them to trigger during typical development. Should write down somewhere that when adding a new target it's highly recommended to do so! |
Minimal IR that triggers this assertion:
|
Looks very similar to an issue that AVR ran into. I've had this patch that I've been applying manually, not sure how valid it is to upstream. |
@shepmaster I did some digging and found out that in this case |
Absolutely, which is why I haven't submitted it anywhere; I was simply trying to help. I apologize. I would like to see what changes you make to LLVM to fix this, as it's likely AVR will need the same thing. You might even fix it, now that AVR is in LLVM :-). |
I didn't mean to be rude. I'm sorry if it sounded that way.
Of course, I will try fix this, but I'm still new to LLVM so can't promise anything. Maybe |
I have posted the fix for review: |
On some platforms (like MSP430) the second element of the result structure for SMULO/UMULO may have a shorter type than the one returned by SetCC. We need to truncate it to the right type, or else some incorrect code may be generated later on. This fixes issue rust-lang/rust#37829 Patch by Vadzim Dambrouski! Differential Revision: https://reviews.llvm.org/D27154 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288857 91177308-0d34-0410-b5e6-96231b3b80d8
On some platforms (like MSP430) the second element of the result structure for SMULO/UMULO may have a shorter type than the one returned by SetCC. We need to truncate it to the right type, or else some incorrect code may be generated later on. This fixes issue rust-lang/rust#37829 Patch by Vadzim Dambrouski! Differential Revision: https://reviews.llvm.org/D27154 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288857 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed in llvm upstream, commit rL288857. |
@pftbest I'd say backport if it's easy to do so. No idea how long the next llvm-up will take. |
On some platforms (like MSP430) the second element of the result structure for SMULO/UMULO may have a shorter type than the one returned by SetCC. We need to truncate it to the right type, or else some incorrect code may be generated later on. This fixes issue rust-lang/rust#37829 Patch by Vadzim Dambrouski! Differential Revision: https://reviews.llvm.org/D27154 llvm-svn=288857
LLVM: Update submodule to include patches for MSP430. Fixes #37829
STR
Meta
I didn't see this when I tested #37672 because the default rustbuild configuration has LLVM assertions disabled whereas nightlies enable the assertions. 😞
cc @alexcrichton
The text was updated successfully, but these errors were encountered: