diff options
author | Hal Finkel <hfinkel@anl.gov> | 2014-09-01 04:26:40 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2014-09-01 04:26:40 +0000 |
commit | cbb85f249e15ec6dfb109ca25083f939b70148be (patch) | |
tree | caedae1d0dd693dcb89c268edd5e3cae1e18915d /llvm/test/Transforms/Inline | |
parent | 5208cc5dbed7b179fb9fa2f2619a604ef4117136 (diff) | |
download | bcm5719-llvm-cbb85f249e15ec6dfb109ca25083f939b70148be.tar.gz bcm5719-llvm-cbb85f249e15ec6dfb109ca25083f939b70148be.zip |
Fix AddAliasScopeMetadata again - alias.scope must be a complete description
I thought that I had fixed this problem in r216818, but I did not do a very
good job. The underlying issue is that when we add alias.scope metadata we are
asserting that this metadata completely describes the aliasing relationships
within the current aliasing scope domain, and so in the context of translating
noalias argument attributes, the pointers must all be based on noalias
arguments (as underlying objects) and have no other kind of underlying object.
In r216818 excluding appropriate accesses from getting alias.scope metadata is
done by looking for underlying objects that are not identified function-local
objects -- but that's wrong because allocas, etc. are also function-local
objects and we need to explicitly check that all underlying objects are the
noalias arguments for which we're adding metadata aliasing scopes.
This fixes the underlying-object check for adding alias.scope metadata, and
does some refactoring of the related capture-checking eligibility logic (and
adds more comments; hopefully making everything a bit clearer).
Fixes self-hosting on x86_64 with -mllvm -enable-noalias-to-md-conversion (the
feature is still disabled by default).
llvm-svn: 216863
Diffstat (limited to 'llvm/test/Transforms/Inline')
-rw-r--r-- | llvm/test/Transforms/Inline/noalias-calls.ll | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/test/Transforms/Inline/noalias-calls.ll b/llvm/test/Transforms/Inline/noalias-calls.ll index d2404013d22..65b2f6e39cc 100644 --- a/llvm/test/Transforms/Inline/noalias-calls.ll +++ b/llvm/test/Transforms/Inline/noalias-calls.ll @@ -7,10 +7,12 @@ declare void @hey() #0 define void @hello(i8* noalias nocapture %a, i8* noalias nocapture readonly %c, i8* nocapture %b) #1 { entry: + %l = alloca i8, i32 512, align 1 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %b, i64 16, i32 16, i1 0) call void @llvm.memcpy.p0i8.p0i8.i64(i8* %b, i8* %c, i64 16, i32 16, i1 0) call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %c, i64 16, i32 16, i1 0) call void @hey() + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %l, i8* %c, i64 16, i32 16, i1 0) ret void } @@ -26,6 +28,7 @@ entry: ; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %b, i8* %c, i64 16, i32 16, i1 false) #0, !noalias !3 ; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %c, i64 16, i32 16, i1 false) #0, !alias.scope !5 ; CHECK: call void @hey() #0, !noalias !5 +; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.*}}, i8* %c, i64 16, i32 16, i1 false) #0, !noalias !3 ; CHECK: ret void ; CHECK: } |