We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1009c5 commit ec75831Copy full SHA for ec75831
enzyme/Enzyme/AdjointGenerator.h
@@ -2079,7 +2079,12 @@ class AdjointGenerator
2079
SmallVector<Value *, 2> args = {
2080
lookup(gutils->getNewFromOriginal(orig_ops[0]), Builder2)};
2081
Type *tys[] = {orig_ops[0]->getType()};
2082
- auto SqrtF = Intrinsic::getDeclaration(M, ID, tys);
+ Function *SqrtF;
2083
+ if (ID == Intrinsic::sqrt)
2084
+ SqrtF = Intrinsic::getDeclaration(M, ID, tys);
2085
+ else
2086
+ SqrtF = Intrinsic::getDeclaration(M, ID);
2087
+
2088
auto cal = cast<CallInst>(Builder2.CreateCall(SqrtF, args));
2089
cal->setCallingConv(SqrtF->getCallingConv());
2090
cal->setDebugLoc(gutils->getNewFromOriginal(I.getDebugLoc()));
0 commit comments