about summary refs log tree commit diff homepage
path: root/test/Concrete/ConstantInit.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/Concrete/ConstantInit.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/Concrete/ConstantInit.ll')
-rw-r--r--test/Concrete/ConstantInit.ll29
1 files changed, 16 insertions, 13 deletions
diff --git a/test/Concrete/ConstantInit.ll b/test/Concrete/ConstantInit.ll
index 2127d27b..c30b7f09 100644
--- a/test/Concrete/ConstantInit.ll
+++ b/test/Concrete/ConstantInit.ll
@@ -1,3 +1,6 @@
+; LLVM 3.7 requires a type as the first argument to 'load'
+; LLVM 3.7 requires a type as the first argument to 'getelementptr'
+; REQUIRES: geq-llvm-3.7
 ; RUN: %S/ConcreteTest.py --klee='%klee' --lli=%lli %s
 
 %struct.dirent = type { i64, i64, i16, i8 }
@@ -6,23 +9,23 @@ declare void @print_i64(i64)
 define void @test_constant_vector_simple() {
   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 i64>*
 	; Initialize with constant vector parsed as ConstantDataSequential
 	store <2 x i64> <i64 0, i64 4096>, <2 x i64>* %tmp2, align 8
-	
+
 	br label %exit
 exit:
 	; Print first initialized element
-	%idx = getelementptr %struct.dirent* %a, i32 0, i32 0
-	%val = load i64* %idx	
+	%idx = getelementptr %struct.dirent, %struct.dirent* %a, i32 0, i32 0
+	%val = load i64, i64* %idx
 	call void @print_i64(i64 %val)
 
-	; Print second initialized element	
-	%idx2 = getelementptr %struct.dirent* %a, i32 0, i32 1
-	%val2 = load i64* %idx2	
+	; Print second initialized element
+	%idx2 = getelementptr %struct.dirent, %struct.dirent* %a, i32 0, i32 1
+	%val2 = load i64, i64* %idx2
 	call void @print_i64(i64 %val2)
-	ret void	
+	ret void
 }
 
 define void @test_constant_vector_complex() {
@@ -34,18 +37,18 @@ entry:
 	br label %exit
 exit:
 	; Print first initialized element
-	%idx = getelementptr <2 x i1024>* %a, i32 0, i32 0
+	%idx = getelementptr <2 x i1024>, <2 x i1024>* %a, i32 0, i32 0
 	%narrow = bitcast i1024* %idx to i64*
-	%val = load i64* %narrow
+	%val = load i64, i64* %narrow
 	call void @print_i64(i64 %val)
 
 	; Print second initialized element
-	%idx2 = getelementptr <2 x i1024>* %a, i32 0, i32 1
+	%idx2 = getelementptr <2 x i1024>, <2 x i1024>* %a, i32 0, i32 1
 	%narrow2 = bitcast i1024* %idx2 to i64*
-	%val2 = load i64* %narrow2
+	%val2 = load i64, i64* %narrow2
 	call void @print_i64(i64 %val2)
 
-	ret void	
+	ret void
 }
 
 define i32 @main() {