Commit 198d7545 authored by Alastair Robertson's avatar Alastair Robertson

Fix and re-enable codegen tests

They should be run with LLVM 5
parent dbc1cd68
......@@ -9,4 +9,6 @@ services:
script:
- ./build-docker-image.sh
- ./build-debug.sh
- build-debug/tests/bpftrace_test --gtest_filter=-codegen*
- ./build-release.sh
- build-debug/tests/bpftrace_test
- build-release/tests/bpftrace_test
......@@ -2,6 +2,6 @@
Tests can be run with the `bpftrace_test` executable.
The code generation tests are based on the output of the latest stable version of LLVM, so may give errors if run with an older LLVM. They can be excluded by running:
The code generation tests are based on the output of LLVM 5, so may give errors if run with different version. They can be excluded by running:
`bpftrace_test --gtest_filter=-codegen*`
......@@ -113,7 +113,7 @@ entry:
store i8 104, i8* %str.repack3, align 1
%str.repack4 = getelementptr inbounds [64 x i8], [64 x i8]* %str, i64 0, i64 4
%2 = bitcast i64* %"@x_key" to i8*
call void @llvm.memset.p0i8.i64(i8* nonnull %str.repack4, i8 0, i64 60, i32 1, i1 false)
call void @llvm.memset.p0i8.i64(i8* %str.repack4, i8 0, i64 60, i32 1, i1 false)
call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %2)
store i64 0, i64* %"@x_key", align 8
%pseudo = tail call i64 @llvm.bpf.pseudo(i64 1, i64 1)
......@@ -191,11 +191,11 @@ entry:
store i8 97, i8* %1, align 1
%str.sroa.3.0..sroa_idx = getelementptr inbounds [128 x i8], [128 x i8]* %"@x_key", i64 0, i64 1
%str1.sroa.0.0..sroa_idx = getelementptr inbounds [128 x i8], [128 x i8]* %"@x_key", i64 0, i64 64
call void @llvm.memset.p0i8.i64(i8* nonnull %str.sroa.3.0..sroa_idx, i8 0, i64 63, i32 1, i1 false)
call void @llvm.memset.p0i8.i64(i8* %str.sroa.3.0..sroa_idx, i8 0, i64 63, i32 1, i1 false)
store i8 98, i8* %str1.sroa.0.0..sroa_idx, align 1
%str1.sroa.3.0..sroa_idx = getelementptr inbounds [128 x i8], [128 x i8]* %"@x_key", i64 0, i64 65
%2 = bitcast i64* %"@x_val" to i8*
call void @llvm.memset.p0i8.i64(i8* nonnull %str1.sroa.3.0..sroa_idx, i8 0, i64 63, i32 1, i1 false)
call void @llvm.memset.p0i8.i64(i8* %str1.sroa.3.0..sroa_idx, i8 0, i64 63, i32 1, i1 false)
call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %2)
store i64 44, i64* %"@x_val", align 8
%pseudo = tail call i64 @llvm.bpf.pseudo(i64 1, i64 1)
......@@ -1008,7 +1008,7 @@ entry:
store i8 102, i8* %str.repack7, align 1
%str.repack8 = getelementptr inbounds [64 x i8], [64 x i8]* %str, i64 0, i64 4
%2 = bitcast i64* %"@x_key" to i8*
call void @llvm.memset.p0i8.i64(i8* nonnull %str.repack8, i8 0, i64 60, i32 1, i1 false)
call void @llvm.memset.p0i8.i64(i8* %str.repack8, i8 0, i64 60, i32 1, i1 false)
call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %2)
store i64 0, i64* %"@x_key", align 8
%pseudo = tail call i64 @llvm.bpf.pseudo(i64 1, i64 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment