From: Matt Arsenault Date: Mon, 29 Jun 2020 18:21:46 +0000 (-0400) Subject: LowerConstantIntrinsics: Fix missing test for byval behavior X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c308dc80a5c6efe4dcb85dc6e20b2691da5c367;p=platform%2Fupstream%2Fllvm.git LowerConstantIntrinsics: Fix missing test for byval behavior --- diff --git a/llvm/test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll b/llvm/test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll index 94aba44..ee5d792 100644 --- a/llvm/test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll +++ b/llvm/test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll @@ -81,3 +81,11 @@ entry: i1 false, i1 false) ret i64 %0 } + +; CHECK-LABEL: @test_objectsize_byval_arg( +; CHECK: ret i64 42 +define i64 @test_objectsize_byval_arg([42 x i8]* byval([42 x i8]) %ptr) { + %cast = bitcast [42 x i8]* %ptr to i8* + %size = tail call i64 @llvm.objectsize.i64(i8* %cast, i1 true, i1 false, i1 false) + ret i64 %size +}