Skip to content

Internal llvm failure if using -O2 with thumbv7em-linux-eabi target #14870

Closed
@farcaller

Description

@farcaller
Contributor

On cross-compiling libcore, if cpu is locked in to cortex-m4 and -O2 is used, llvm fails with unreachable:

rustc --target thumbv7em-linux-eabi -Ctarget-cpu=cortex-m4 --opt-level 2 libcore/lib.rs
Unexpected member type for HA
UNREACHABLE executed at /Users/farcaller/temp/rust/src/llvm/lib/Target/ARM/ARMCallingConv.h:213!

Compiling without --opt-level 2 or -Ctarget-cpu=cortex-m4 works as expected.

PS: I think this is an LLVM bug, but I cannot figure out a small test case.

Activity

alexcrichton

alexcrichton commented on Jun 13, 2014

@alexcrichton
Member

This is the IR run through bugpoint: https://gist.github.com/ff0487dadc8576d07bdf.

This isn't very actionable on our end as this definitely looks like an LLVM bug, so I'm going to close this. I would recommend reporting the bugpoint output upstream after trying to minimize it further.

farcaller

farcaller commented on Jun 14, 2014

@farcaller
ContributorAuthor

It seems that this one is actually fixed at r209650 of llvm. What's the rust policy to bump tracking llvm version?

alexcrichton

alexcrichton commented on Jun 14, 2014

@alexcrichton
Member

If you make a pull request against rust-lang/llvm with the new commits, I can push so you can update the submodule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @farcaller@alexcrichton

        Issue actions

          Internal llvm failure if using -O2 with thumbv7em-linux-eabi target · Issue #14870 · rust-lang/rust