We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a6e056 commit cf7b24eCopy full SHA for cf7b24e
enzyme/Enzyme/GradientUtils.h
@@ -2186,6 +2186,14 @@ class DiffeGradientUtils final : public GradientUtils {
2186
assert(dif->getType() == old->getType());
2187
Value *res = nullptr;
2188
if (old->getType()->isIntOrIntVectorTy()) {
2189
+ if (!addingType) {
2190
+ if (looseTypeAnalysis) {
2191
+ if (old->getType()->isIntegerTy(64))
2192
+ addingType = Type::getDoubleTy(old->getContext());
2193
+ else if (old->getType()->isIntegerTy(32))
2194
+ addingType = Type::getFloatTy(old->getContext());
2195
+ }
2196
2197
if (!addingType) {
2198
llvm::errs() << "module: " << *oldFunc->getParent() << "\n";
2199
llvm::errs() << "oldFunc: " << *oldFunc << "\n";
0 commit comments