diff --git a/enzyme/Enzyme/AdjointGenerator.h b/enzyme/Enzyme/AdjointGenerator.h index 86341a9fada..18d2f0dc4d9 100644 --- a/enzyme/Enzyme/AdjointGenerator.h +++ b/enzyme/Enzyme/AdjointGenerator.h @@ -2611,7 +2611,7 @@ class AdjointGenerator : public llvm::InstVisitor { 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"; @@ -2639,7 +2639,7 @@ class AdjointGenerator : public llvm::InstVisitor { << " 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); } @@ -2881,7 +2881,7 @@ class AdjointGenerator : public llvm::InstVisitor { 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"; @@ -2909,7 +2909,7 @@ class AdjointGenerator : public llvm::InstVisitor { << " 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()));