[llvm] 7c308dc - LowerConstantIntrinsics: Fix missing test for byval behavior
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 29 12:10:18 PDT 2020
Author: Matt Arsenault
Date: 2020-06-29T14:45:31-04:00
New Revision: 7c308dc80a5c6efe4dcb85dc6e20b2691da5c367
URL: https://github.com/llvm/llvm-project/commit/7c308dc80a5c6efe4dcb85dc6e20b2691da5c367
DIFF: https://github.com/llvm/llvm-project/commit/7c308dc80a5c6efe4dcb85dc6e20b2691da5c367.diff
LOG: LowerConstantIntrinsics: Fix missing test for byval behavior
Added:
Modified:
llvm/test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll b/llvm/test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll
index 94aba44fcc4f..ee5d792d5329 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
+}
More information about the llvm-commits
mailing list