Skip to content

Commit

Permalink
Unconditionally disable LLVM's FastISel on AArch64
Browse files Browse the repository at this point in the history
Before ca07e256f62f772d14c42f41af46f2aeacc54983, LLVM's AArch64FastISel
had a sign (and zero?) extension bug. Until rustc gets its LLVM past
that commit, the way of workaround is to pass an option to LLVM that
forces the disabling of FastISel (which would normally kick in for -O0).

Fixes rust-lang#21627
  • Loading branch information
akosthekiss committed Jan 26, 2015
1 parent 7615e18 commit ea50bf8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/librustc_trans/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,9 @@ unsafe fn configure_llvm(sess: &Session) {
if sess.time_llvm_passes() { add("-time-passes"); }
if sess.print_llvm_passes() { add("-debug-pass=Structure"); }

// FIXME #21627 disable faulty FastISel on AArch64 (even for -O0)
if sess.target.target.arch.as_slice() == "aarch64" { add("-fast-isel=0"); }

for arg in sess.opts.cg.llvm_args.iter() {
add(&(*arg)[]);
}
Expand Down

0 comments on commit ea50bf8

Please sign in to comment.