aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/objsize-64.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/objsize-64.ll')
-rw-r--r--test/Transforms/InstCombine/objsize-64.ll10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/Transforms/InstCombine/objsize-64.ll b/test/Transforms/InstCombine/objsize-64.ll
index 4993063..530e123 100644
--- a/test/Transforms/InstCombine/objsize-64.ll
+++ b/test/Transforms/InstCombine/objsize-64.ll
@@ -8,23 +8,25 @@ declare void @__cxa_call_unexpected(i8*)
declare i64 @llvm.objectsize.i64(i8*, i1) nounwind readonly
; CHECK: @f1
-define i64 @f1() {
+define i64 @f1(i8 **%esc) {
%call = call i8* @malloc(i32 4)
+ store i8* %call, i8** %esc
%size = call i64 @llvm.objectsize.i64(i8* %call, i1 false)
-; CHECK-NEXT: ret i64 4
+; CHECK: ret i64 4
ret i64 %size
}
; CHECK: @f2
-define i64 @f2() nounwind uwtable ssp {
+define i64 @f2(i8** %esc) nounwind uwtable ssp {
entry:
-; CHECK: invoke void @llvm.donothing()
+; CHECK: invoke noalias i8* @_Znwm(i64 13)
%call = invoke noalias i8* @_Znwm(i64 13)
to label %invoke.cont unwind label %lpad
invoke.cont:
; CHECK: ret i64 13
+ store i8* %call, i8** %esc
%0 = tail call i64 @llvm.objectsize.i64(i8* %call, i1 false)
ret i64 %0