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.
Paths
| Differential D108324
[RISCV] Reduce duplicate code for calling SimplifyDemandedBits. ClosedPublic Authored by craig.topper on Aug 18 2021, 12:43 PM.
Details Summary This encapsulates the APInt creation and worklist management into To keep one common interface I've use Log2_32 in places that
Diff Detail
Event TimelineHerald added subscribers: StephenFan, vkmr, frasercrmck and 23 others. · View Herald TranscriptAug 18 2021, 12:43 PM
Comment Actions LGTM.
This revision is now accepted and ready to land.Aug 19 2021, 1:19 AM Closed by commit rG36d8316cc8b6: [RISCV] Reduce duplicate code for calling SimplifyDemandedBits. (authored by craig.topper). · Explain WhyAug 19 2021, 7:18 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 367489 llvm/lib/Target/RISCV/RISCVISelLowering.cpp
|
Do you intend to call this from other functions too? If not, you could make it a lambda and avoid having to pass N, DCI and TLI.