[SelectionDAG] Expose the "getValidShiftAmount" helpers available. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 17 Feb 2020 13:38:20 +0000 (13:38 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 17 Feb 2020 16:28:46 +0000 (16:28 +0000)
commita1585aec6fe7f9da0642b6b7cdf4b496ab078eff
treee95a1abe646443a8714160cc56883e1857563cd5
parent78d455adf02c985a78740a378e6b3a5e8665623d
[SelectionDAG] Expose the "getValidShiftAmount" helpers available. NFCI.

These are going to be useful in TargetLowering::SimplifyDemandedBits, so expose these helpers outside of SelectionDAG.cpp

Also add an getValidShiftAmountConstant early-out to getValidMinimumShiftAmountConstant/getValidMaximumShiftAmountConstant so we can use them for scalar cases as well.
llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp