Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions enzyme/Enzyme/AdjointGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -2611,7 +2611,7 @@ class AdjointGenerator : public llvm::InstVisitor<AdjointGenerator> {
case Instruction::Mul:
case Instruction::Sub:
case Instruction::Add: {
if (looseTypeAnalysis) {
if (looseTypeAnalysis || BO.getType()->isIntOrIntVectorTy()) {
llvm::errs()
<< "warning: binary operator is integer and assumed constant: "
<< BO << "\n";
Expand Down Expand Up @@ -2639,7 +2639,7 @@ class AdjointGenerator : public llvm::InstVisitor<AdjointGenerator> {
<< " val:" << gutils->isConstantValue(&I)
<< " type: " << TR.query(&I).str() << "\n";
}
ss << "cannot handle unknown binary operator: " << BO << "\n";
ss << "derivative of active binary operator not known: " << BO << "\n";
EmitNoDerivativeError(ss.str(), BO, gutils, Builder2);
}

Expand Down Expand Up @@ -2881,7 +2881,7 @@ class AdjointGenerator : public llvm::InstVisitor<AdjointGenerator> {
case Instruction::Mul:
case Instruction::Sub:
case Instruction::Add: {
if (looseTypeAnalysis) {
if (looseTypeAnalysis || BO.getType()->isIntOrIntVectorTy()) {
forwardModeInvertedPointerFallback(BO);
llvm::errs() << "warning: binary operator is integer and constant: "
<< BO << "\n";
Expand Down Expand Up @@ -2909,7 +2909,7 @@ class AdjointGenerator : public llvm::InstVisitor<AdjointGenerator> {
<< " val:" << gutils->isConstantValue(&I)
<< " type: " << TR.query(&I).str() << "\n";
}
ss << "cannot handle unknown binary operator: " << BO << "\n";
ss << "derivative of active binary operator not known: " << BO << "\n";
auto rval = EmitNoDerivativeError(ss.str(), BO, gutils, Builder2);
if (!rval)
rval = Constant::getNullValue(gutils->getShadowType(BO.getType()));
Expand Down
Loading