Skip to content

Commit

Permalink
Fix copysign activity analysis (rust-lang#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Jan 27, 2022
1 parent bb7e879 commit 36d2661
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions enzyme/Enzyme/ActivityAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@ static inline void propagateArgumentInformation(
Name == "__cxa_guard_abort")
return;

/// Only the first argument (magnitude) of copysign is active
if (F->getIntrinsicID() == Intrinsic::copysign) {
propagateFromOperand(CI.getOperand(0));
return;
}

/// Only the src/dst in memset/memcpy/memmove impact the activity of the
/// instruction
// memset cannot propagate activity as it sets
Expand Down

0 comments on commit 36d2661

Please sign in to comment.