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

Incompatible intrinsics between rustc and llc #1392

Closed
jackcmay opened this issue Sep 28, 2018 · 2 comments
Closed

Incompatible intrinsics between rustc and llc #1392

jackcmay opened this issue Sep 28, 2018 · 2 comments
Assignees

Comments

@jackcmay
Copy link
Contributor

jackcmay commented Sep 28, 2018

Compiling rust code with rustc and passing it to llc to be converted to bpf assembly can result in what looks like a conflicting definition of llvm intrinsics

Intrinsic has incorrect argument type!
void (i8*, i8, i64, i1)* @llvm.memset.p0i8.i64

Issue seen when running rustc 1.29.0 but also after aligning the llvm versions pretty closely:

rustc --version --verbose
rustc 1.26.0 (a77568041 2018-05-07)
binary: rustc
commit-hash: a7756804103447ea4e68a71ccf071e7ad8f7a03e
commit-date: 2018-05-07
host: x86_64-apple-darwin
release: 1.26.0
LLVM version: 6.0
llc --version
LLVM (http://llvm.org/):
  LLVM version 6.0.1
  Optimized build.
  Default target: x86_64-apple-darwin17.7.0
  Host CPU: skylake
@jackcmay jackcmay added this to the The Future! milestone Sep 28, 2018
@jackcmay jackcmay self-assigned this Sep 28, 2018
@garious garious changed the title Incompatible intrinsics between rustic and llc Incompatible intrinsics between rustc and llc Sep 29, 2018
@garious
Copy link
Contributor

garious commented Sep 29, 2018

LLVM has been notoriously bad about bitcode compatibility across versions. In this case, it looks like they've respected semantic versioning and bumped the major number between rustc 1.26 and 1.29. Seems fair to not expect compatibility here. What happens when you use the llc from llvm-7?

@jackcmay
Copy link
Contributor Author

Yup, that was the next step, tried it now and the intrinsic incompatibilities go away :-)

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

No branches or pull requests

2 participants