Skip to content

Commit

Permalink
Rollup merge of #107412 - tshepang:needless-check, r=wesleywiser
Browse files Browse the repository at this point in the history
avoid needless checks
  • Loading branch information
GuillaumeGomez authored Jan 31, 2023
2 parents 233b319 + a8418c0 commit c6a104f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions compiler/rustc_codegen_llvm/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,14 @@ pub unsafe fn create_module<'ll>(
target_data_layout =
"e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
.to_string();
}
if sess.target.arch == "wasm32" {
} else if sess.target.arch == "wasm32" {
target_data_layout = target_data_layout.replace("-p10:8:8-p20:8:8", "");
}
}
if llvm_version < (16, 0, 0) {
if sess.target.arch == "s390x" {
target_data_layout = target_data_layout.replace("-v128:64", "");
}

if sess.target.arch == "riscv64" {
} else if sess.target.arch == "riscv64" {
target_data_layout = target_data_layout.replace("-n32:64-", "-n64-");
}
}
Expand Down

0 comments on commit c6a104f

Please sign in to comment.