about summary refs log tree commit diff homepage
path: root/test/Intrinsics/objectsize.ll
diff options
context:
space:
mode:
authorRichard Trembecký <richardt@centrum.sk>2016-04-29 22:33:41 +0200
committerCristian Cadar <c.cadar@imperial.ac.uk>2018-05-24 14:08:27 +0100
commita0cd85b41f02ce5c476612eec182aa1ff3e6fe2b (patch)
treeb7d938116cae4f4a18225e9aef2f8934b761e063 /test/Intrinsics/objectsize.ll
parent870f2d6aac35457e7524078a4b4a8b011f84c45c (diff)
downloadklee-a0cd85b41f02ce5c476612eec182aa1ff3e6fe2b.tar.gz
test: add versions of some tests for LLVM 3.7
Clone some tests to have their 3.7 version. 'call's, 'load's and
'getelementptr's match the new specification in them.

@andreamattavelli: Fixed test cases: BitCastAlias test cases included
modification to alias specifications that require LLVM 3.8

[v2] added comments what was changed and why
[v3] the new tests are without suffix, the old ones have ".leq36".

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'test/Intrinsics/objectsize.ll')
-rw-r--r--test/Intrinsics/objectsize.ll9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/Intrinsics/objectsize.ll b/test/Intrinsics/objectsize.ll
index 4bb59596..3a111f99 100644
--- a/test/Intrinsics/objectsize.ll
+++ b/test/Intrinsics/objectsize.ll
@@ -1,3 +1,8 @@
+; Unfortunately LLVM 2.9 has a different suffix for the ``llvm.objectsize`` instrinsic
+; so this LLVM IR fails to verify for that version.
+;
+; LLVM 3.7 requires a type as the first argument to 'load'
+; REQUIRES: geq-llvm-3.7
 ; RUN: %llvmas %s -o=%t.bc
 ; RUN: rm -rf %t.klee-out
 ; RUN: %klee -exit-on-error --output-dir=%t.klee-out -disable-opt %t.bc
@@ -8,13 +13,13 @@ target triple = "x86_64-unknown-linux-gnu"
 define i32 @main() nounwind uwtable {
 entry:
   %a = alloca i8*, align 8
-  %0 = load i8** %a, align 8
+  %0 = load i8*, i8** %a, align 8
   %1 = call i64 @llvm.objectsize.i64.p0i8(i8* %0, i1 true)
   %cmp = icmp ne i64 %1, 0
   br i1 %cmp, label %abort.block, label %continue.block
 
 continue.block:
-  %2 = load i8** %a, align 8
+  %2 = load i8*, i8** %a, align 8
   %3 = call i64 @llvm.objectsize.i64.p0i8(i8* %2, i1 false)
   %cmp1 = icmp ne i64 %3, -1
   br i1 %cmp1, label %abort.block, label %exit.block