Skip to content
Unverified Commit e042ff7e authored by Yingwei Zheng's avatar Yingwei Zheng
Browse files

[SDAG][RISCV] Avoid expanding is-power-of-2 pattern on riscv32/64 with zbb

This patch adjusts the legality check for riscv to use `cpop/cpopw` since `isOperationLegal(ISD::CTPOP, MVT::i32)` returns false on rv64gc_zbb.
Clang vs gcc: https://godbolt.org/z/rc3s4hjPh

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D156390
parent 695138ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment