about summary refs log tree commit diff
path: root/src/test/codegen/function-arguments.rs
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2017-02-25 14:13:28 +0200
committerGitHub <noreply@github.com>2017-02-25 14:13:28 +0200
commit5c0b4b369167060aa73368374d48a7de6c812376 (patch)
treeca2af1e18df25368b90b2334c1dab4c16c0c3292 /src/test/codegen/function-arguments.rs
parent0a950bdb3d39dc3ed12b9cfb06ba4deed1a96194 (diff)
parentd80cf80b16660289ebc9765940d02b36ef1032b6 (diff)
downloadrust-5c0b4b369167060aa73368374d48a7de6c812376.tar.gz
rust-5c0b4b369167060aa73368374d48a7de6c812376.zip
Rollup merge of #39995 - Aatch:vtable-ptr-metadata, r=arielb1
Set metadata for vtable-related loads

Give LLVM much more information about vtable pointers. Without the extra
information, LLVM has to be rather pessimistic about vtables, preventing
a number of obvious optimisations.

* Makes the vtable pointer argument noalias and readonly.
* Marks loads of the vtable pointer as nonnull.
* Marks load from the vtable with `!invariant.load` metadata.

Fixes #39992
Diffstat (limited to 'src/test/codegen/function-arguments.rs')
-rw-r--r--src/test/codegen/function-arguments.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/codegen/function-arguments.rs b/src/test/codegen/function-arguments.rs
index c373cdb76c5..76313b158ab 100644
--- a/src/test/codegen/function-arguments.rs
+++ b/src/test/codegen/function-arguments.rs
@@ -121,13 +121,13 @@ pub fn unsafe_slice(_: &[UnsafeInner]) {
 fn str(_: &[u8]) {
 }
 
-// CHECK: @trait_borrow(i8* nonnull, void (i8*)** nonnull)
+// CHECK: @trait_borrow(i8* nonnull, void (i8*)** noalias nonnull readonly)
 // FIXME #25759 This should also have `nocapture`
 #[no_mangle]
 fn trait_borrow(_: &Drop) {
 }
 
-// CHECK: @trait_box(i8* noalias nonnull, void (i8*)** nonnull)
+// CHECK: @trait_box(i8* noalias nonnull, void (i8*)** noalias nonnull readonly)
 #[no_mangle]
 fn trait_box(_: Box<Drop>) {
 }