summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/64bit-swiftcall.c
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2018-03-06 23:07:00 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2018-03-06 23:07:00 +0000
commit7e03f350e8ae93806b13cb32516a4d54515b794d (patch)
tree6bb8c478d9d30eaeca5c683d575c5b053f355012 /clang/test/CodeGen/64bit-swiftcall.c
parente2fc88a2fe6522d47f5bc98af4caf256c27271d6 (diff)
downloadbcm5719-llvm-7e03f350e8ae93806b13cb32516a4d54515b794d.tar.gz
bcm5719-llvm-7e03f350e8ae93806b13cb32516a4d54515b794d.zip
[CodeGen] Don't emit lifetime.end without lifetime.start
EmitLifetimeStart returns a non-null `size` pointer if it actually emits a lifetime.start. Later in this function, we use `tempSize`'s nullness to determine whether or not we should emit a lifetime.end. llvm-svn: 326844
Diffstat (limited to 'clang/test/CodeGen/64bit-swiftcall.c')
-rw-r--r--clang/test/CodeGen/64bit-swiftcall.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGen/64bit-swiftcall.c b/clang/test/CodeGen/64bit-swiftcall.c
index c5944b99b59..2eed2a4b290 100644
--- a/clang/test/CodeGen/64bit-swiftcall.c
+++ b/clang/test/CodeGen/64bit-swiftcall.c
@@ -1032,3 +1032,12 @@ typedef union {
TEST(union_hom_fp_partial2)
// X86-64-LABEL: take_union_hom_fp_partial2(i64, float)
// ARM64-LABEL: take_union_hom_fp_partial2(i64, float)
+
+// At one point, we emitted lifetime.ends without a matching lifetime.begin for
+// CoerceAndExpanded args. Since we're not performing optimizations, neither
+// intrinsic should be emitted.
+// CHECK-LABEL: define void @no_lifetime_markers
+void no_lifetime_markers() {
+ // CHECK-NOT: call void @llvm.lifetime.
+ take_int5(return_int5());
+}
OpenPOWER on IntegriCloud