[all-commits] [llvm/llvm-project] d51e3a: [LegalizeTypes][TargetLowering] Merge getShiftAmou...
Craig Topper via All-commits
all-commits at lists.llvm.org
Mon Oct 25 14:10:03 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d51e3a21391af957c500695ebc04a1fc43b00c6c
https://github.com/llvm/llvm-project/commit/d51e3a21391af957c500695ebc04a1fc43b00c6c
Author: Craig Topper <craig.topper at sifive.com>
Date: 2021-10-25 (Mon, 25 Oct 2021)
Changed paths:
M llvm/include/llvm/CodeGen/TargetLowering.h
M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
M llvm/lib/CodeGen/TargetLoweringBase.cpp
Log Message:
-----------
[LegalizeTypes][TargetLowering] Merge getShiftAmountTyForConstant into TargetLowering::getShiftAmountTy.
getShiftAmountTyForConstant is a special helper that changes the
shift amount to i32 if the type chosen by
TargetLowering::getShiftAmountTy can't represent all possible values.
This is needed to satisfy an assert in SelectionDAG::getNode.
It requires additional consideration to know when this helper should be used.
I'm not sure that we are always using it when we should.
This patch merges the getShiftAmountTyForConstant handling into
TargetLowering::getShiftAmountTy so we don't need to think about it
anymore.
Technically this may slightly increase compile times since the majority
of callers of getShiftAmountTy won't need this. Hopefully, this isn't
an issue in practice.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D112469
More information about the All-commits
mailing list