Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Nov 6, 2023
1 parent 434803a commit f8cf5e5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion enzyme/Enzyme/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,10 @@ Function *getOrInsertMemcpyMat(Module &Mod, Type *elementType, PointerType *PT,
#if LLVM_VERSION_MAJOR >= 15
if (Mod.getContext().supportsTypedPointers()) {
#endif
assert(PT->getPointerElementType() == elementType);
#if LLVM_VERSION_MAJOR >= 13
if (!PT->isOpaquePointerTy())
#endif
assert(PT->getPointerElementType() == elementType);
#if LLVM_VERSION_MAJOR >= 15
}
#endif
Expand Down
4 changes: 4 additions & 0 deletions enzyme/Enzyme/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@ static inline DIFFE_TYPE whatType(llvm::Type *arg, DerivativeMode mode,
if (!arg->getContext().supportsTypedPointers()) {
return DIFFE_TYPE::DUP_ARG;
}
#elif LLVM_VERSION_MAJOR >= 13
if (arg->isOpaquePointerTy()) {
return DIFFE_TYPE::DUP_ARG;
}
#endif
switch (whatType(arg->getPointerElementType(), mode, integersAreConstant,
seen)) {
Expand Down
4 changes: 2 additions & 2 deletions enzyme/test/Enzyme/ReverseMode/blas_diffuse.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: if [ %llvmver -lt 16 ] && [ %llvmver -ge 13 ] ; then %opt < %s %loadEnzyme -enzyme -enzyme-preopt=false -mem2reg -early-cse -instsimplify -jump-threading -adce -S | FileCheck %s; fi
; RUN: if [ %llvmver -ge 13 ]; then %opt < %s %newLoadEnzyme -passes="enzyme,function(mem2reg,early-cse,instsimplify,jump-threading,adce)" -enzyme-preopt=false -S | FileCheck %s ; fi
; RUN: if [ %llvmver -lt 16 ] && [ %llvmver -ge 13 ] ; then %opt < %s %loadEnzyme -opaque-pointers -enzyme -enzyme-preopt=false -mem2reg -early-cse -instsimplify -jump-threading -adce -S | FileCheck %s; fi
; RUN: if [ %llvmver -ge 13 ]; then %opt < %s %newLoadEnzyme -opaque-pointers -passes="enzyme,function(mem2reg,early-cse,instsimplify,jump-threading,adce)" -enzyme-preopt=false -S | FileCheck %s ; fi

; ModuleID = '../examples/big/big_inlined_correctness.cpp'
source_filename = "../examples/big/big_inlined_correctness.cpp"
Expand Down
2 changes: 1 addition & 1 deletion enzyme/test/Integration/blas_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ int xerbla_(const char *srname, integer *info, int len)
return 0;
}
__attribute__((noinline))
logical lsame_(char *ca, char *cb, int cs, int cb)
logical lsame_(char *ca, char *cb, int ca_size, int cb_size)
{
/* System generated locals */
logical ret_val;
Expand Down

0 comments on commit f8cf5e5

Please sign in to comment.