[llvm] [SDAG] Use shifts if ISD::MUL is illegal when lowering ISD::CTPOP (PR #86505)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 28 05:43:55 PDT 2024
================
@@ -285,9 +285,12 @@ define i32 @test_ctpop_i32(i32 %a) nounwind {
; LA64-NEXT: lu12i.w $a1, 61680
; LA64-NEXT: ori $a1, $a1, 3855
; LA64-NEXT: and $a0, $a0, $a1
-; LA64-NEXT: lu12i.w $a1, 4112
-; LA64-NEXT: ori $a1, $a1, 257
-; LA64-NEXT: mul.d $a0, $a0, $a1
+; LA64-NEXT: slli.d $a1, $a0, 8
----------------
arsenm wrote:
LegalizerInfo::getAction is the closest thing, which will show you the next legalization step. We currently are lacking helpers to iteratively walk through chains of legalization to find the ultimate type
https://github.com/llvm/llvm-project/pull/86505
More information about the llvm-commits
mailing list