From a06a3680f64efb91933670a39cbddc69c6d22ccb Mon Sep 17 00:00:00 2001 From: Ivan Radanov Ivanov Date: Thu, 25 Apr 2024 11:23:19 +0900 Subject: [PATCH] [Truncate] Fix bug with fcmp handling We did not pass the truncated values to the runtime --- enzyme/Enzyme/EnzymeLogic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/enzyme/Enzyme/EnzymeLogic.cpp b/enzyme/Enzyme/EnzymeLogic.cpp index 96f5bc0e917d..da0c03c1428e 100644 --- a/enzyme/Enzyme/EnzymeLogic.cpp +++ b/enzyme/Enzyme/EnzymeLogic.cpp @@ -5252,8 +5252,8 @@ class TruncateGenerator : public llvm::InstVisitor, auto truncRHS = truncate(B, RHS); SmallVector Args; - Args.push_back(LHS); - Args.push_back(RHS); + Args.push_back(truncLHS); + Args.push_back(truncRHS); Instruction *nres; if (truncation.isToFPRT()) nres = createFPRTOpCall(B, CI, B.getInt1Ty(), Args);