Skip to content

Commit

Permalink
Fix unwrap of invert (rust-lang#541)
Browse files Browse the repository at this point in the history
Co-authored-by: Valentin Churavy <v.churavy@gmail.com>
  • Loading branch information
wsmoses and vchuravy authored Mar 3, 2022
1 parent 5093a8c commit 1c331bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions enzyme/Enzyme/GradientUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,8 @@ Value *GradientUtils::unwrapM(Value *const val, IRBuilder<> &BuilderM,
if (isOriginalBlock(*BuilderM.GetInsertBlock())) {
pidx = invertPointerM(dli->getOperand(0), BuilderM);
} else {
pidx =
lookupM(invertPointerM(dli->getOperand(0), BuilderM), BuilderM);
pidx = lookupM(invertPointerM(dli->getOperand(0), BuilderM), BuilderM,
available);
}

if (pidx == nullptr)
Expand Down

0 comments on commit 1c331bc

Please sign in to comment.