[RISCV] Lower VP_CTLZ_ZERO_UNDEF/VP_CTTZ_ZERO_UNDEF/VP_CTLZ by converting to FP and...
authorLiaoChunyu <chunyu@iscas.ac.cn>
Tue, 18 Jul 2023 07:10:53 +0000 (15:10 +0800)
committerLiaoChunyu <chunyu@iscas.ac.cn>
Tue, 18 Jul 2023 07:25:59 +0000 (15:25 +0800)
commit65ffcc099c7f91a15e57b013e2713fa1a49540d2
tree9bcf500994718861000c96e7c983c9f7ebb5aaaf
parentd18ce73170043d7137d12fa1f759a0c5fd1fe223
[RISCV] Lower VP_CTLZ_ZERO_UNDEF/VP_CTTZ_ZERO_UNDEF/VP_CTLZ by converting to FP and extracting the exponent.

D111904, D141585 made RISC-V customized lower vector ISD::CTLZ_ZERO_UNDEF/CTTZ_ZERO_UNDEF/CTLZ
by converting to float and using the float result.

Perhaps VP_CTLZ_ZERO_UNDEF/VP_CTTZ_ZERO_UNDEF/VP_CTLZ could use the similar feature.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D155150
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/ctlz-vp.ll
llvm/test/CodeGen/RISCV/rvv/cttz-vp.ll