[llvm] [RISCV][GISel] Remove s32 support for G_CTPOP/CTLZ/CTTZ on RV64. (PR #115101)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 7 09:54:09 PST 2024
================
@@ -794,6 +792,8 @@ define signext i32 @ctpop_i32_load(ptr %p) nounwind {
; RV64ZBB-LABEL: ctpop_i32_load:
; RV64ZBB: # %bb.0:
; RV64ZBB-NEXT: lw a0, 0(a0)
+; RV64ZBB-NEXT: slli a0, a0, 32
----------------
topperc wrote:
It's not needed. The two shifts are a zero_extend from s32 to s64. We need to enable load+zext combine post legalization to get rid of the zext.
https://github.com/llvm/llvm-project/pull/115101
More information about the llvm-commits
mailing list