Skip to content

Commit

Permalink
Use files generated by Clang 8 for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reikdas committed Jul 8, 2021
1 parent 6ba969f commit 00e616d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 29 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,5 @@ jobs:
run: cd enzyme/build && make -j`nproc` LLVMEnzyme-${{ matrix.llvm }}
- name: make check-enzyme-integration
run: cd enzyme/build && make check-enzyme-integration -j`nproc`
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
timeout-minutes: 50
- name: make check-bcpass
run: cd enzyme/build && make && make check-bcpass -j`nproc`
run: cd enzyme/build && make check-bcpass -j`nproc`
Binary file modified enzyme/bclib/cblas_ddot_double.bc
Binary file not shown.
39 changes: 14 additions & 25 deletions enzyme/test/BCLoader/bcloader-ddot.ll
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
; return 1;
;}

target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@__const.main.m = private unnamed_addr constant [3 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00], align 16
@__const.main.n = private unnamed_addr constant [3 x double] [double 4.000000e+00, double 5.000000e+00, double 6.000000e+00], align 16

; Function Attrs: noinline nounwind optnone uwtable
define dso_local double @g(double* %m, double* %n) #0 {
define dso_local double @g(double* %m, double* %n) {
entry:
%m.addr = alloca double*, align 8
%n.addr = alloca double*, align 8
Expand Down Expand Up @@ -60,10 +60,10 @@ entry:
ret double %7
}

declare dso_local double @cblas_ddot(i32, double*, i32, double*, i32) #1
declare dso_local double @cblas_ddot(i32, double*, i32, double*, i32)

; Function Attrs: noinline nounwind optnone uwtable
define dso_local i32 @main() #0 {
define dso_local i32 @main() {
entry:
%retval = alloca i32, align 4
%m = alloca [3 x double], align 16
Expand All @@ -80,35 +80,24 @@ entry:
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %2, i8* align 16 bitcast ([3 x double]* @__const.main.n to i8*), i64 24, i1 false)
%3 = bitcast [3 x double]* %n1 to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %3, i8 0, i64 24, i1 false)
%arraydecay = getelementptr inbounds [3 x double], [3 x double]* %m, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [3 x double], [3 x double]* %m1, i64 0, i64 0
%arraydecay2 = getelementptr inbounds [3 x double], [3 x double]* %n, i64 0, i64 0
%arraydecay3 = getelementptr inbounds [3 x double], [3 x double]* %n1, i64 0, i64 0
%arraydecay = getelementptr inbounds [3 x double], [3 x double]* %m, i32 0, i32 0
%arraydecay1 = getelementptr inbounds [3 x double], [3 x double]* %m1, i32 0, i32 0
%arraydecay2 = getelementptr inbounds [3 x double], [3 x double]* %n, i32 0, i32 0
%arraydecay3 = getelementptr inbounds [3 x double], [3 x double]* %n1, i32 0, i32 0
%call = call double @__enzyme_autodiff(i8* bitcast (double (double*, double*)* @g to i8*), double* %arraydecay, double* %arraydecay1, double* %arraydecay2, double* %arraydecay3)
store double %call, double* %val, align 8
ret i32 1
}

; Function Attrs: argmemonly nofree nosync nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
; Function Attrs: argmemonly nounwind
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i1)

; Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #3
; Function Attrs: argmemonly nounwind
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1)

declare dso_local double @__enzyme_autodiff(i8*, double*, double*, double*, double*) #1
declare dso_local double @__enzyme_autodiff(i8*, double*, double*, double*, double*)

attributes #0 = { noinline nounwind optnone uwtable "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #2 = { argmemonly nofree nosync nounwind willreturn }
attributes #3 = { argmemonly nofree nosync nounwind willreturn writeonly }

!llvm.module.flags = !{!0}
!llvm.ident = !{!1}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 12.0.1 (https://github.com/llvm/llvm-project.git b7c7b42db1d16c4cab595bf53c62a70a6a505e0e)"}

;CHECK: double @cblas_ddot(i32 %__N, double* %__X, i32 %__incX, double* %__Y, i32 %__incY)
;CHECK: define dso_local double @cblas_ddot(i32 %__N, double* %__X, i32 %__incX, double* %__Y, i32 %__incY) #1 {
;CHECK-NEXT: entry:
;CHECK-NEXT: %__N.addr = alloca i32, align 4
;CHECK-NEXT: %__X.addr = alloca double*, align 8
Expand Down

0 comments on commit 00e616d

Please sign in to comment.