From 1bcf5ee200b22392dce968beef41cb209d11ddd3 Mon Sep 17 00:00:00 2001 From: William Moses Date: Sun, 3 Nov 2024 04:39:50 -0600 Subject: [PATCH] Cast of addr13 (#2147) --- enzyme/Enzyme/DifferentialUseAnalysis.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/enzyme/Enzyme/DifferentialUseAnalysis.cpp b/enzyme/Enzyme/DifferentialUseAnalysis.cpp index e490941272c..6a4573b736a 100644 --- a/enzyme/Enzyme/DifferentialUseAnalysis.cpp +++ b/enzyme/Enzyme/DifferentialUseAnalysis.cpp @@ -917,6 +917,15 @@ void DifferentialUseAnalysis::minCut(const DataLayout &DL, LoopInfo &OrigLI, if (ASC->getSrcAddressSpace() == 10 && ASC->getDestAddressSpace() == 0) continue; } + if (auto CI = dyn_cast((*mp.begin()).V)) { + if (CI->getType()->isPointerTy() && + CI->getType()->getPointerAddressSpace() == 13) + continue; + } + if (auto G = dyn_cast((*mp.begin()).V)) { + if (G->getType()->getPointerAddressSpace() == 13) + continue; + } if (hasNoCache((*mp.begin()).V)) { continue; }