forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#130426 - workingjubilee:rollup-63xnjry, r=wor…
…kingjubilee Rollup of 5 pull requests Successful merges: - rust-lang#127879 (Document futility of printing temporary pointers) - rust-lang#130325 (Use -0.0 in `intrinsics::simd::reduce_add_unordered`) - rust-lang#130336 (simplify `Build::update_existing_submodule`) - rust-lang#130398 (Add system libs for LLVM when cross compiling for Windows) - rust-lang#130420 (Register tool docs for `src/tools/build_helper`) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
7 changed files
with
55 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//@ revisions: x86_64 aarch64 | ||
//@ assembly-output: emit-asm | ||
//@ compile-flags: --crate-type=lib -O | ||
//@[aarch64] only-aarch64 | ||
//@[x86_64] only-x86_64 | ||
//@[x86_64] compile-flags: -Ctarget-feature=+sse3 | ||
#![feature(portable_simd)] | ||
#![feature(core_intrinsics)] | ||
use std::intrinsics::simd as intrinsics; | ||
use std::simd::*; | ||
// Regression test for https://github.com/rust-lang/rust/issues/130028 | ||
// This intrinsic produces much worse code if you use +0.0 instead of -0.0 because | ||
// +0.0 isn't as easy to algebraically reassociate, even using LLVM's reassoc attribute! | ||
// It would emit about an extra fadd, depending on the architecture. | ||
|
||
// CHECK-LABEL: reduce_fadd_negative_zero | ||
pub unsafe fn reduce_fadd_negative_zero(v: f32x4) -> f32 { | ||
// x86_64: addps | ||
// x86_64-NEXT: movshdup | ||
// x86_64-NEXT: addss | ||
// x86_64-NOT: xorps | ||
|
||
// aarch64: faddp | ||
// aarch64-NEXT: faddp | ||
|
||
// CHECK-NOT: {{f?}}add{{p?s*}} | ||
// CHECK: ret | ||
intrinsics::simd_reduce_add_unordered(v) | ||
} |