balaatur commented on code in PR #55278:
URL: https://github.com/apache/arrow/pull/55278#discussion_r4396141387


##########
cpp/src/gandiva/decimal_ir.cc:
##########
@@ -246,9 +246,10 @@ DecimalIR::ValueWithOverflow 
DecimalIR::AddWithOverflowCheck(const ValueFull& x,
 // This is pretty complex, so use CPP fns.
 llvm::Value* DecimalIR::AddLarge(const ValueFull& x, const ValueFull& y,
                                  const ValueFull& out) {
-  auto block = ir_builder()->GetInsertBlock();
-  auto out_high_ptr = new llvm::AllocaInst(types()->i64_type(), 0, "out_hi", 
block);
-  auto out_low_ptr = new llvm::AllocaInst(types()->i64_type(), 0, "out_low", 
block);
+  auto& entry = ir_builder()->GetInsertBlock()->getParent()->getEntryBlock();

Review Comment:
   Could this be merged with the other change ? It looks like the code is 
duplicated. Maybe via a helper function ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to