about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-05-06 16:59:45 +0000
committerbors <bors@rust-lang.org>2020-05-06 16:59:45 +0000
commit1836e3b42a5b2f37fd79104eedbe8f48a5afdee6 (patch)
tree3ccc77fe3cc8fd490bb01d89e2d94815a9affec0 /src/test/codegen
parent339f574809bf8e4166b8de3cdbe7df181d37af3d (diff)
parentfbb4ccbee61dc95afcbcd05fd63053e2980edf97 (diff)
downloadrust-1836e3b42a5b2f37fd79104eedbe8f48a5afdee6.tar.gz
rust-1836e3b42a5b2f37fd79104eedbe8f48a5afdee6.zip
Auto merge of #71951 - Dylan-DPC:rollup-j9v1p0f, r=Dylan-DPC
Rollup of 7 pull requests

Successful merges:

 - #71269 (Define UB in float-to-int casts to saturate)
 - #71591 (use new interface to create threads on HermitCore)
 - #71819 (x.py: Give a more helpful error message if curl isn't installed)
 - #71893 (Use the `impls` module to import pre-existing dataflow analyses)
 - #71929 (Use -fvisibility=hidden for libunwind)
 - #71937 (Ignore SGX on a few ui tests)
 - #71944 (Add comment for `Ord` implementation for array)

Failed merges:

r? @ghost
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/unchecked-float-casts.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/codegen/unchecked-float-casts.rs b/src/test/codegen/unchecked-float-casts.rs
index 34e96122223..789feea12d6 100644
--- a/src/test/codegen/unchecked-float-casts.rs
+++ b/src/test/codegen/unchecked-float-casts.rs
@@ -1,7 +1,7 @@
-// compile-flags: -C no-prepopulate-passes
+// This file tests that we don't generate any code for saturation when using the
+// unchecked intrinsics.
 
-// This file tests that we don't generate any code for saturation if
-// -Z saturating-float-casts is not enabled.
+// compile-flags: -C opt-level=3
 
 #![crate_type = "lib"]
 
@@ -12,7 +12,7 @@ pub fn f32_to_u32(x: f32) -> u32 {
     // CHECK-NOT: fcmp
     // CHECK-NOT: icmp
     // CHECK-NOT: select
-    x as u32
+    unsafe { x.to_int_unchecked() }
 }
 
 // CHECK-LABEL: @f32_to_i32
@@ -22,7 +22,7 @@ pub fn f32_to_i32(x: f32) -> i32 {
     // CHECK-NOT: fcmp
     // CHECK-NOT: icmp
     // CHECK-NOT: select
-    x as i32
+    unsafe { x.to_int_unchecked() }
 }
 
 #[no_mangle]
@@ -31,5 +31,5 @@ pub fn f64_to_u16(x: f64) -> u16 {
     // CHECK-NOT: fcmp
     // CHECK-NOT: icmp
     // CHECK-NOT: select
-    x as u16
+    unsafe { x.to_int_unchecked() }
 }