[PATCH] D40320: [NFC] CodeGen: Handle shift amount type in DAGTypeLegalizer::SplitInteger
Yaxun Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 14:42:35 PST 2017
yaxunl added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:1175
Lo = DAG.getNode(ISD::TRUNCATE, dl, LoVT, Op);
- Hi =
- DAG.getNode(ISD::SRL, dl, Op.getValueType(), Op,
- DAG.getConstant(LoVT.getSizeInBits(), dl,
- TLI.getScalarShiftAmountTy(
- DAG.getDataLayout(), Op.getValueType())));
+ unsigned ReqShiftAmountInBits = Log2_32(LoVT.getSizeInBits()) + 1;
+ MVT ShiftAmountTy =
----------------
efriedma wrote:
> Log2_32_Ceil?
It is different. E.g, the number 32 requires 6 bits to hold, but Log2_32_Ceil(32) == 5.
https://reviews.llvm.org/D40320
More information about the llvm-commits
mailing list