Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Commit

Permalink
fix multiplication IR
Browse files Browse the repository at this point in the history
  • Loading branch information
akroviakov authored and kurapov-peter committed Mar 25, 2023
1 parent 3326a26 commit 5c7f06c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion omniscidb/QueryEngine/ArithmeticIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,11 @@ llvm::Value* CodeGenerator::codegenMul(const hdk::ir::BinOper* bin_oper,
cgen_state_->ir_builder_.CreateICmpEQ(rhs_lv, const_zero), mul_ok, mul_check);
cgen_state_->ir_builder_.SetInsertPoint(mul_check);
auto rhs_is_negative_lv = cgen_state_->ir_builder_.CreateICmpSLT(rhs_lv, const_zero);
auto lhs_is_negative_lv = cgen_state_->ir_builder_.CreateICmpSLT(lhs_lv, const_zero);
auto positive_rhs_lv = cgen_state_->ir_builder_.CreateSelect(
rhs_is_negative_lv, cgen_state_->ir_builder_.CreateNeg(rhs_lv), rhs_lv);
auto adjusted_lhs_lv = cgen_state_->ir_builder_.CreateSelect(
rhs_is_negative_lv, cgen_state_->ir_builder_.CreateNeg(lhs_lv), lhs_lv);
lhs_is_negative_lv, cgen_state_->ir_builder_.CreateNeg(lhs_lv), lhs_lv);
auto detected = cgen_state_->ir_builder_.CreateOr( // overflow
cgen_state_->ir_builder_.CreateICmpSGT(
adjusted_lhs_lv,
Expand Down
1 change: 0 additions & 1 deletion omniscidb/Tests/IntelGPUEnablingTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@ TEST_F(AggregationTest, Sum) {
}

TEST_F(AggregationTest, FilterAndSum) {
GTEST_SKIP();
c("SELECT SUM(x * dd) FROM test;", g_dt);
c("SELECT SUM(y * dd) FROM test;", g_dt);
c("SELECT SUM(w * dd) FROM test;", g_dt);
Expand Down

0 comments on commit 5c7f06c

Please sign in to comment.