Michael Smith has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/25010


Change subject: IMPALA-11917: Avoid trunc to i1 in CodegenAnyVal::GetIsNull
......................................................................

IMPALA-11917: Avoid trunc to i1 in CodegenAnyVal::GetIsNull

In DEBUG builds on aarch64, LLVM uses GlobalISel at -O0. Codegen for
string aggregates such as GROUP_CONCAT hung in its legalizer. GetIsNull
emitted 'trunc i64 to i1' for the null flag, which InstCombine rewrites
to an extractelement on a <128 x i1> bitcast of the SROA'd StringVal
vector. GlobalISel cannot legalize that efficiently.

Test the low bit with 'and 1; icmp ne 0' instead, which LLVM turns into
an i8 extractelement. This replaces the aarch64 -O0 GlobalISel disable
flag added in the previous commit, so GlobalISel is no longer bypassed.

Testing:
- load_nested.py's tmp_orders query hung for over 120s before and now
  completes in about 8s on an aarch64 DEBUG build.
- The optimized IR for that query contains no <N x i1> vectors.

Change-Id: I9882bc674d7d852e04786cae71faa415ba397140
Assisted-by: Claude Sonnet 5.5 (GitHub Copilot)
---
M be/src/codegen/codegen-anyval.cc
M be/src/codegen/llvm-codegen.cc
2 files changed, 14 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/10/25010/1
--
To view, visit http://gerrit.cloudera.org:8080/25010
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9882bc674d7d852e04786cae71faa415ba397140
Gerrit-Change-Number: 25010
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Smith <[email protected]>

Reply via email to