From b06ff16961aed89ef78978d037e0833521e728ba Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Sat, 28 Dec 2024 21:15:51 -0500 Subject: [PATCH] Fix copyslice v2 --- enzyme/Enzyme/ActivityAnalysis.cpp | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/enzyme/Enzyme/ActivityAnalysis.cpp b/enzyme/Enzyme/ActivityAnalysis.cpp index 67972fdcc8c..4d5ec8d1108 100644 --- a/enzyme/Enzyme/ActivityAnalysis.cpp +++ b/enzyme/Enzyme/ActivityAnalysis.cpp @@ -668,7 +668,7 @@ static inline void propagateArgumentInformation( // Only the 0-th arg impacts activity if (Name == "jl_genericmemory_copy_slice" || Name == "ijl_genericmemory_copy_slice") { - propagateFromOperand(CI.getArgOperand(1)); + propagateFromOperand(CI.getArgOperand(0)); return; } @@ -1613,29 +1613,6 @@ bool ActivityAnalyzer::isConstantValue(TypeResults const &TR, Value *Val) { return true; } - if (funcName == "jl_genericmemory_copy_slice" || - funcName == "ijl_genericmemory_copy_slice") { - if (directions == UP) { - if (isConstantValue(TR, op->getArgOperand(0))) { - InsertConstantValue(TR, Val); - return true; - } - } else { - if (UpHypothesis->isConstantValue(TR, op->getArgOperand(0))) { - InsertConstantValue(TR, Val); - insertConstantsFrom(TR, *UpHypothesis); - return true; - } - } - if (EnzymeEnableRecursiveHypotheses) { - ReEvaluateValueIfInactiveValue[op->getArgOperand(0)].insert(Val); - if (TmpOrig != Val) { - ReEvaluateValueIfInactiveValue[op->getArgOperand(0)].insert( - TmpOrig); - } - } - } - // If requesting empty unknown functions to be considered inactive, // abide by those rules if (called && EnzymeEmptyFnInactive && called->empty() &&