]> granicus.if.org Git - llvm/commit
[NFC] CodeGen: Handle shift amount type in DAGTypeLegalizer::SplitInteger
authorYaxun Liu <Yaxun.Liu@amd.com>
Thu, 23 Nov 2017 03:08:51 +0000 (03:08 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Thu, 23 Nov 2017 03:08:51 +0000 (03:08 +0000)
commit5a85a28dde85e4fdfcec1982c15c8a2fdb76d60c
tree16ed2af80b8674ab0fc7bf77c5526553ec768c7a
parent7b0e38dff863c245149586a16538bae74e9cb816
[NFC] CodeGen: Handle shift amount type in DAGTypeLegalizer::SplitInteger

This patch reverts change to X86TargetLowering::getScalarShiftAmountTy in
rL318727 and move the logic to DAGTypeLegalizer::SplitInteger.

The reason is that getScalarShiftAmountTy returns a shift amount type that
is suitable for common use cases in CodeGen. DAGTypeLegalizer::SplitInteger
is a rare situation which requires a shift amount type larger than what
getScalarShiftAmountTy. In this case, it is more reasonable to do special
handling of shift amount type in DAGTypeLegalizer::SplitInteger only. If
similar situations arises the logic may be moved to a separate function.

Differential Revision: https://reviews.llvm.org/D40320

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318890 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
lib/Target/X86/X86ISelLowering.h