diff options
| author | Erik Pilkington <erik.pilkington@gmail.com> | 2019-01-30 20:34:35 +0000 |
|---|---|---|
| committer | Erik Pilkington <erik.pilkington@gmail.com> | 2019-01-30 20:34:35 +0000 |
| commit | 600e9deacfa86a827d7cba4494c55ca6909e045f (patch) | |
| tree | 7e5d8a592a7ea359f564f46cd8a691bde4042a8c /llvm/test/CodeGen/X86 | |
| parent | 7e880b026220e41125ca5acc6e7e319d18951142 (diff) | |
| download | bcm5719-llvm-600e9deacfa86a827d7cba4494c55ca6909e045f.tar.gz bcm5719-llvm-600e9deacfa86a827d7cba4494c55ca6909e045f.zip | |
Add a 'dynamic' parameter to the objectsize intrinsic
This is meant to be used with clang's __builtin_dynamic_object_size.
When 'true' is passed to this parameter, the intrinsic has the
potential to be folded into instructions that will be evaluated
at run time. When 'false', the objectsize intrinsic behaviour is
unchanged.
rdar://32212419
Differential revision: https://reviews.llvm.org/D56761
llvm-svn: 352664
Diffstat (limited to 'llvm/test/CodeGen/X86')
| -rw-r--r-- | llvm/test/CodeGen/X86/is-constant.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/X86/is-constant.ll b/llvm/test/CodeGen/X86/is-constant.ll index d02bbae2085..b4c1f351a2a 100644 --- a/llvm/test/CodeGen/X86/is-constant.ll +++ b/llvm/test/CodeGen/X86/is-constant.ll @@ -15,7 +15,7 @@ target triple = "x86_64-unknown-linux-gnu" declare i1 @llvm.is.constant.i32(i32 %a) nounwind readnone declare i1 @llvm.is.constant.i64(i64 %a) nounwind readnone -declare i64 @llvm.objectsize.i64.p0i8(i8*, i1, i1) nounwind readnone +declare i64 @llvm.objectsize.i64.p0i8(i8*, i1, i1, i1) nounwind readnone declare i32 @subfun_1() declare i32 @subfun_2() @@ -44,7 +44,7 @@ define i1 @test_objectsize(i8* %obj) nounwind { ; CHECK-O2: %bb.0: ; CHECK-O2: movb $1, %al ; CHECK-O2-NEXT: retq - %os = call i64 @llvm.objectsize.i64.p0i8(i8* %obj, i1 false, i1 false) + %os = call i64 @llvm.objectsize.i64.p0i8(i8* %obj, i1 false, i1 false, i1 false) %v = call i1 @llvm.is.constant.i64(i64 %os) ret i1 %v } |

