Skip to content

Commit acc699f

Browse files
committed
Auto merge of #30987 - antonblanchard:powerpc64_merge3, r=alexcrichton
We currently pass generic as the CPU to LLVM. This results in worse than required code generation. On little endian, which is only POWER8, we avoid many POWER4 and newer instructions. Pass ppc64 and ppc64le instead.
2 parents 0888649 + 1fb9f42 commit acc699f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/librustc_back/target/powerpc64_unknown_linux_gnu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use target::Target;
1212

1313
pub fn target() -> Target {
1414
let mut base = super::linux_base::opts();
15+
base.cpu = "ppc64".to_string();
1516
base.pre_link_args.push("-m64".to_string());
1617

1718
Target {

src/librustc_back/target/powerpc64le_unknown_linux_gnu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use target::Target;
1212

1313
pub fn target() -> Target {
1414
let mut base = super::linux_base::opts();
15+
base.cpu = "ppc64le".to_string();
1516
base.pre_link_args.push("-m64".to_string());
1617

1718
Target {

0 commit comments

Comments
 (0)