Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Nov 13, 2024
1 parent 69002c0 commit 370821c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions enzyme/test/Enzyme/ForwardMode/intelSubscriptIntrinsic.ll
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ declare void @__enzyme_fwddiff(float (...)* noalias, %"QNCA_a0$float*$rank1$"* n
!8 = !{!"ifx$unique_sym$10", !9, i64 0}
!9 = !{!"Fortran Data Symbol", !4, i64 0}

; CHECK: define internal float @fwddiffeselectfirst(%"QNCA_a0$float*$rank1$"* noalias nocapture readonly dereferenceable(72) "ptrnoalias" %X, %"QNCA_a0$float*$rank1$"* nocapture %"X'") local_unnamed_addr #0 {
; CHECK: define internal float @fwddiffeselectfirst(%"QNCA_a0$float*$rank1$"* noalias nocapture readonly dereferenceable(72) "ptrnoalias" %X, %"QNCA_a0$float*$rank1$"* nocapture %"X'")
; CHECK-NEXT: entry:
; CHECK-NEXT: %"X.addr_a0$'ipg" = getelementptr inbounds %"QNCA_a0$float*$rank1$", %"QNCA_a0$float*$rank1$"* %"X'", i64 0, i32 0
; CHECK-NEXT: %"X.addr_a0$" = getelementptr inbounds %"QNCA_a0$float*$rank1$", %"QNCA_a0$float*$rank1$"* %X, i64 0, i32 0
; CHECK-NEXT: %"X.addr_a0$_fetch.29'ipl" = load float*, float** %"X.addr_a0$'ipg", align 1, !tbaa !0, !alias.scope !10, !noalias !13
; CHECK-NEXT: %"X.addr_a0$_fetch.29" = load float*, float** %"X.addr_a0$", align 1, !tbaa !0, !alias.scope !13, !noalias !10
; CHECK-NEXT: %"X.dim_info$.lower_bound$" = getelementptr inbounds %"QNCA_a0$float*$rank1$", %"QNCA_a0$float*$rank1$"* %X, i64 0, i32 6, i64 0, i32 2
; CHECK-NEXT: %"X.dim_info$.lower_bound$[]" = tail call i64* @llvm.intel.subscript.p0i64.i64.i32.p0i64.i32(i8 0, i64 0, i32 24, i64* nonnull elementtype(i64) %"X.dim_info$.lower_bound$", i32 0) #0
; CHECK-NEXT: %"X.dim_info$.lower_bound$[]" = tail call i64* @llvm.intel.subscript.p0i64.i64.i32.p0i64.i32(i8 0, i64 0, i32 24, i64* nonnull elementtype(i64) %"X.dim_info$.lower_bound$", i32 0)
; CHECK-NEXT: %"X.dim_info$.lower_bound$[]_fetch.30" = load i64, i64* %"X.dim_info$.lower_bound$[]", align 1, !tbaa !6, !alias.scope !13, !noalias !10
; CHECK-NEXT: %0 = call float* @llvm.intel.subscript.p0f32.i64.i64.p0f32.i64(i8 0, i64 %"X.dim_info$.lower_bound$[]_fetch.30", i64 4, float* elementtype(float) %"X.addr_a0$_fetch.29'ipl", i64 1)
; CHECK-NEXT: %"X.addr_a0$_fetch.29[]" = tail call float* @llvm.intel.subscript.p0f32.i64.i64.p0f32.i64(i8 0, i64 %"X.dim_info$.lower_bound$[]_fetch.30", i64 4, float* elementtype(float) %"X.addr_a0$_fetch.29", i64 1) #0
; CHECK-NEXT: %"X.addr_a0$_fetch.29[]" = tail call float* @llvm.intel.subscript.p0f32.i64.i64.p0f32.i64(i8 0, i64 %"X.dim_info$.lower_bound$[]_fetch.30", i64 4, float* elementtype(float) %"X.addr_a0$_fetch.29", i64 1)
; CHECK-NEXT: %"X.addr_a0$_fetch.29[]_fetch.32'ipl" = load float, float* %0, align 1, !tbaa !7, !alias.scope !15, !noalias !18
; CHECK-NEXT: ret float %"X.addr_a0$_fetch.29[]_fetch.32'ipl"
; CHECK-NEXT: }
; CHECK-NEXT: }
1 change: 1 addition & 0 deletions enzyme/test/Enzyme/ReverseMode/hascast.ll
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ attributes #3 = { nounwind }
; CHECK-NEXT: entry:
; CHECK-NEXT: %[[loadcallp:.+]] = load double, double* %[[callp]]
; CHECK-NEXT: store double 0.000000e+00, double* %[[callp]]
; CHECK-NEXT: call void @diffecast(double* %x, double* %"x'")
; CHECK-NEXT: %[[m0diffez:.+]] = fmul fast double %[[loadcallp]], %y
; CHECK-NEXT: %[[m1diffey:.+]] = fmul fast double %[[loadcallp]], %z
; CHECK-NEXT: %[[toret0:.+]] = insertvalue { double, double } undef, double %[[m1diffey]], 0
Expand Down
4 changes: 2 additions & 2 deletions enzyme/test/Enzyme/ReverseMode/tgamma.ll
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ declare double @tgamma(double)

; CHECK: define internal fastcc { double } @diffea5(double %arg, double %differeturn)
; CHECK-NEXT: bb:
; CHECK-NEXT: %i8 = call double @tgamma(double %arg) #1
; CHECK-NEXT: %i8 = call double @tgamma(double %arg)
; CHECK-NEXT: %0 = fmul fast double %differeturn, %arg
; CHECK-NEXT: %1 = fmul fast double %i8, %differeturn
; CHECK-NEXT: %2 = call fast double @digamma(double %arg) #0
; CHECK-NEXT: %2 = call fast double @digamma(double %arg)
; CHECK-NEXT: %3 = fmul fast double %2, %0
; CHECK-NEXT: %4 = fadd fast double %1, %3
; CHECK-NEXT: %5 = insertvalue { double } undef, double %4, 0
Expand Down

0 comments on commit 370821c

Please sign in to comment.