[RISCV] Reduce duplicate code for calling SimplifyDemandedBits.
authorCraig Topper <craig.topper@sifive.com>
Wed, 18 Aug 2021 19:21:04 +0000 (12:21 -0700)
committerCraig Topper <craig.topper@sifive.com>
Thu, 19 Aug 2021 14:09:38 +0000 (07:09 -0700)
commit36d8316cc8b6ab85d0d3ed46a04490afa5e49a29
treefbd0d32cf903bae8f49ae5772f14ba5a00df79f6
parent765a4212764d819e77772d916419d5e6d9b53460
[RISCV] Reduce duplicate code for calling SimplifyDemandedBits.

This encapsulates the APInt creation and worklist management into
a helper function.

To keep one common interface I've use Log2_32 in places that
previously created a mask by subtracting 1 from a power of 2.

Differential Revision: https://reviews.llvm.org/D108324
llvm/lib/Target/RISCV/RISCVISelLowering.cpp