Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanradanov committed Apr 25, 2024
1 parent 65aba59 commit 16960d3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions enzyme/Enzyme/EnzymeLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5439,6 +5439,8 @@ class TruncateGenerator : public llvm::InstVisitor<TruncateGenerator>,

void visitReturnInst(llvm::ReturnInst &I) {
auto newI = cast<llvm::ReturnInst>(getNewFromOriginal(&I));
if (newI->getNumOperands() == 0)
return;
IRBuilder<> B(newI);
if (isa<ConstantFP>(newI->getOperand(0)))
newI->setOperand(0, createFPRTConstCall(B, newI->getReturnValue()));
Expand Down

0 comments on commit 16960d3

Please sign in to comment.