diff options
author | Jordan Rupprecht <rupprecht@google.com> | 2019-05-14 21:58:59 +0000 |
---|---|---|
committer | Jordan Rupprecht <rupprecht@google.com> | 2019-05-14 21:58:59 +0000 |
commit | b35a2aa71f76a334a9c98c0a3c3995b5d902d2b9 (patch) | |
tree | cdff4a5d1a715d4ad622fd8f190128b54bebe440 /test/CodeGen/annotations-var.c | |
parent | 3748d41833787fcbf59cc5624e8d2b042a8991bc (diff) | |
parent | 741e05796da92b46d4f7bcbee00702ff37df6489 (diff) |
Creating branches/google/stable and tags/google/stable/2019-05-14 from r360103google/stable
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/google/stable@360714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/annotations-var.c')
-rw-r--r-- | test/CodeGen/annotations-var.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/CodeGen/annotations-var.c b/test/CodeGen/annotations-var.c index 6e8ad34c65..3dc6dca3e7 100644 --- a/test/CodeGen/annotations-var.c +++ b/test/CodeGen/annotations-var.c @@ -39,10 +39,19 @@ void local(void) { // LOCAL-NEXT: call void @llvm.var.annotation(i8* [[T0]], i8* getelementptr inbounds ([15 x i8], [15 x i8]* @{{.*}}), i8* getelementptr inbounds ({{.*}}), i32 33) } +void local_after_return(void) { + return; + int localvar __attribute__((annotate("localvar_after_return"))) = 3; +// Test we are not emitting instructions like bitcast or call outside of a basic block. +// LOCAL-LABEL: define void @local_after_return() +// LOCAL: [[LOCALVAR:%.*]] = alloca i32, +// LOCAL-NEXT: ret void +} + void undef(void) { int undefvar __attribute__((annotate("undefvar_ann_0"))); // UNDEF-LABEL: define void @undef() // UNDEF: [[UNDEFVAR:%.*]] = alloca i32, // UNDEF-NEXT: [[T0:%.*]] = bitcast i32* [[UNDEFVAR]] to i8* -// UNDEF-NEXT: call void @llvm.var.annotation(i8* [[T0]], i8* getelementptr inbounds ([15 x i8], [15 x i8]* @{{.*}}), i8* getelementptr inbounds ({{.*}}), i32 43) +// UNDEF-NEXT: call void @llvm.var.annotation(i8* [[T0]], i8* getelementptr inbounds ([15 x i8], [15 x i8]* @{{.*}}), i8* getelementptr inbounds ({{.*}}), i32 52) } |