Skip to content

Commit

Permalink
more info for shadowRV (#1920)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Jun 8, 2024
1 parent 79e8299 commit cd6f629
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions enzyme/Enzyme/EnzymeLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3023,8 +3023,11 @@ const AugmentedReturn &EnzymeLogic::CreateAugmentedPrimal(
if (auto ggep = dyn_cast<GetElementPtrInst>(gep)) {
ggep->setIsInBounds(true);
}
if (!(isa<ConstantExpr>(shadowRV) || isa<ConstantData>(shadowRV))) {
shadowRV = VMap[shadowRV];
if (!(isa<ConstantExpr>(shadowRV) || isa<ConstantData>(shadowRV) ||
isa<ConstantAggregate>(shadowRV))) {
auto found = VMap.find(shadowRV);
assert(found != VMap.end());
shadowRV = found->second;
}
if (EnzymeFixupReturn)
shadowRV = unwrap(EnzymeFixupReturn(wrap(&ib), wrap(shadowRV)));
Expand Down

0 comments on commit cd6f629

Please sign in to comment.