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 27, 2015
1 parent 72f6776 commit 075d45a
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 @@ -1003,6 +1003,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 075d45a

Please sign in to comment.