diff options
| author | bors <bors@rust-lang.org> | 2018-05-19 07:42:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-19 07:42:03 +0000 |
| commit | bdace29de04af4fe9e4317b73c3f7d6418a33de1 (patch) | |
| tree | 0ef01deb994b33e4338c109ded1cc7cf2b9357da /src/test/codegen/function-arguments.rs | |
| parent | 8319ef5b78a10b3a8de4109bb8b0e6d23fbe4de1 (diff) | |
| parent | 12308139ec76dfa050ed012606495250391aaf74 (diff) | |
| download | rust-bdace29de04af4fe9e4317b73c3f7d6418a33de1.tar.gz rust-bdace29de04af4fe9e4317b73c3f7d6418a33de1.zip | |
Auto merge of #50744 - nikic:mutable-noalias, r=alexcrichton
Emit noalias on &mut parameters by default This used to be disabled due to LLVM bugs in the handling of noalias information in conjunction with unwinding. However, according to #31681 all known LLVM bugs have been fixed by LLVM 6.0, so it's probably time to reenable this optimization. -Z no-mutable-noalias is left as an escape-hatch to debug problems suspected to stem from this change.
Diffstat (limited to 'src/test/codegen/function-arguments.rs')
| -rw-r--r-- | src/test/codegen/function-arguments.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/test/codegen/function-arguments.rs b/src/test/codegen/function-arguments.rs index 40a9ea5a181..e3fa7a7db39 100644 --- a/src/test/codegen/function-arguments.rs +++ b/src/test/codegen/function-arguments.rs @@ -10,6 +10,7 @@ // compile-flags: -C no-prepopulate-passes // ignore-tidy-linelength +// min-llvm-version 6.0 #![crate_type = "lib"] #![feature(custom_attribute)] @@ -52,16 +53,14 @@ pub fn named_borrow<'r>(_: &'r i32) { pub fn unsafe_borrow(_: &UnsafeInner) { } -// CHECK: @mutable_unsafe_borrow(i16* dereferenceable(2) %arg0) +// CHECK: @mutable_unsafe_borrow(i16* noalias dereferenceable(2) %arg0) // ... unless this is a mutable borrow, those never alias -// ... except that there's this LLVM bug that forces us to not use noalias, see #29485 #[no_mangle] pub fn mutable_unsafe_borrow(_: &mut UnsafeInner) { } -// CHECK: @mutable_borrow(i32* dereferenceable(4) %arg0) +// CHECK: @mutable_borrow(i32* noalias dereferenceable(4) %arg0) // FIXME #25759 This should also have `nocapture` -// ... there's this LLVM bug that forces us to not use noalias, see #29485 #[no_mangle] pub fn mutable_borrow(_: &mut i32) { } @@ -103,9 +102,8 @@ pub fn helper(_: usize) { pub fn slice(_: &[u8]) { } -// CHECK: @mutable_slice([0 x i8]* nonnull %arg0.0, [[USIZE]] %arg0.1) +// CHECK: @mutable_slice([0 x i8]* noalias nonnull %arg0.0, [[USIZE]] %arg0.1) // FIXME #25759 This should also have `nocapture` -// ... there's this LLVM bug that forces us to not use noalias, see #29485 #[no_mangle] pub fn mutable_slice(_: &mut [u8]) { } |
