diff options
author | Richard Trembecký <richardt@centrum.sk> | 2016-04-29 22:33:41 +0200 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2018-05-24 14:08:27 +0100 |
commit | a0cd85b41f02ce5c476612eec182aa1ff3e6fe2b (patch) | |
tree | b7d938116cae4f4a18225e9aef2f8934b761e063 /test/Feature/ConstantArray.ll | |
parent | 870f2d6aac35457e7524078a4b4a8b011f84c45c (diff) | |
download | klee-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/Feature/ConstantArray.ll')
-rw-r--r-- | test/Feature/ConstantArray.ll | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/test/Feature/ConstantArray.ll b/test/Feature/ConstantArray.ll index 161b2a16..195b4cb0 100644 --- a/test/Feature/ConstantArray.ll +++ b/test/Feature/ConstantArray.ll @@ -1,3 +1,7 @@ +; LLVM 3.7 requires a type as the first argument to 'getelementptr' +; LLVM 3.7 requires a type as the first argument to 'load' +; LLVM 3.7 no longer accepts '*' with a 'call' +; REQUIRES: geq-llvm-3.7 ; RUN: llvm-as %s -f -o %t1.bc ; RUN: rm -rf %t.klee-out ; RUN: %klee --output-dir=%t.klee-out -disable-opt %t1.bc 2>&1 | FileCheck %s @@ -13,22 +17,22 @@ declare void @klee_print_expr(i8*, ...) define i32 @main() { entry: %a = alloca %struct.dirent - %tmp1 = getelementptr %struct.dirent* %a, i32 0 + %tmp1 = getelementptr %struct.dirent, %struct.dirent* %a, i32 0 %tmp2 = bitcast %struct.dirent* %tmp1 to <2 x i32>* ; Initialize with constant vector store <2 x i32> <i32 42, i32 4096>, <2 x i32>* %tmp2 br label %exit exit: ; Print first initialized element - %idx = getelementptr %struct.dirent* %a, i32 0, i32 0 - %val = load i32* %idx - call void(i8*, ...)* @klee_print_expr(i8* getelementptr inbounds ([2 x i8]* @.str, i32 0, i32 0), i32 %val) + %idx = getelementptr %struct.dirent, %struct.dirent* %a, i32 0, i32 0 + %val = load i32, i32* %idx + call void(i8*, ...) @klee_print_expr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i32 %val) ; CHECK: 0:42 ; Print second initialized element - %idx2 = getelementptr %struct.dirent* %a, i32 0, i32 1 - %val2 = load i32* %idx2 - call void(i8*, ...)* @klee_print_expr(i8* getelementptr inbounds ([2 x i8]* @.str2, i32 0, i32 0), i32 %val2) + %idx2 = getelementptr %struct.dirent, %struct.dirent* %a, i32 0, i32 1 + %val2 = load i32, i32* %idx2 + call void(i8*, ...) @klee_print_expr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str2, i32 0, i32 0), i32 %val2) ; CHECK: 1:4096 ; Initialize with constant array @@ -36,16 +40,16 @@ exit: store [2 x i32][i32 7, i32 9], [2 x i32]* %array ; Print first initialized element - %idx3 = getelementptr [2 x i32]* %array, i32 0, i32 0 - %val3 = load i32* %idx3 - call void(i8*, ...)* @klee_print_expr(i8* getelementptr inbounds ([2 x i8]* @.str, i32 0, i32 0), i32 %val3) + %idx3 = getelementptr [2 x i32], [2 x i32]* %array, i32 0, i32 0 + %val3 = load i32, i32* %idx3 + call void(i8*, ...) @klee_print_expr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i32 %val3) ; CHECK: 0:7 ; Print second initialized element - %idx4 = getelementptr [2 x i32]* %array, i32 0, i32 1 - %val4 = load i32* %idx4 - call void(i8*, ...)* @klee_print_expr(i8* getelementptr inbounds ([2 x i8]* @.str2, i32 0, i32 0), i32 %val4) + %idx4 = getelementptr [2 x i32], [2 x i32]* %array, i32 0, i32 1 + %val4 = load i32, i32* %idx4 + call void(i8*, ...) @klee_print_expr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str2, i32 0, i32 0), i32 %val4) ; CHECK: 1:9 ret i32 0 -} \ No newline at end of file +} |