As suggested on D113371, this adds a wrapper to SelectionDAG::ComputeNumSignBits, similar to the llvm::ComputeMinSignedBits wrapper.
I've included some usage, its not exhaustive, just the more obvious cases where the intention is obvious.
Paths
| Differential D113396
[DAG] Add SelectionDAG::ComputeMinSignedBits helper ClosedPublic Authored by RKSimon on Nov 8 2021, 5:45 AM.
Details Summary As suggested on D113371, this adds a wrapper to SelectionDAG::ComputeNumSignBits, similar to the llvm::ComputeMinSignedBits wrapper. I've included some usage, its not exhaustive, just the more obvious cases where the intention is obvious.
Diff Detail
Event TimelineHerald added subscribers: foad, ecnelises, kerbowa and 5 others. · View Herald TranscriptNov 8 2021, 5:45 AM This revision is now accepted and ready to land.Nov 8 2021, 5:51 AM This revision was landed with ongoing or failed builds.Nov 8 2021, 6:13 AM Closed by commit rGf059b04f7b81: [DAG] Add SelectionDAG::ComputeMinSignedBits helper (authored by RKSimon). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 385475 llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
|