diff options
| author | wangpc <wangpengcheng.pp@bytedance.com> | 2024-07-05 16:47:50 +0800 |
|---|---|---|
| committer | Wang Pengcheng <wangpengcheng.pp@bytedance.com> | 2024-07-05 16:47:50 +0800 |
| commit | b6415b46e6a24470802600f5d5ec1d14fa3ba003 (patch) | |
| tree | da0f6997ea857964870fd4652804e30d41bbb7b9 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
| parent | 600fe423c020d03dbaa0470bf57bd50392518606 (diff) | |
| parent | ca94bf9f2bd15fe34936f1759bffd26d7e93b182 (diff) | |
Created using spr 1.3.6-beta.1
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index ff684c7cb6bb..353b0cafbd72 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -1052,13 +1052,12 @@ MVT TargetLoweringBase::getScalarShiftAmountTy(const DataLayout &DL, return MVT::getIntegerVT(DL.getPointerSizeInBits(0)); } -EVT TargetLoweringBase::getShiftAmountTy(EVT LHSTy, const DataLayout &DL, - bool LegalTypes) const { +EVT TargetLoweringBase::getShiftAmountTy(EVT LHSTy, + const DataLayout &DL) const { assert(LHSTy.isInteger() && "Shift amount is not an integer type!"); if (LHSTy.isVector()) return LHSTy; - MVT ShiftVT = - LegalTypes ? getScalarShiftAmountTy(DL, LHSTy) : getPointerTy(DL); + MVT ShiftVT = getScalarShiftAmountTy(DL, LHSTy); // If any possible shift value won't fit in the prefered type, just use // something safe. Assume it will be legalized when the shift is expanded. if (ShiftVT.getSizeInBits() < Log2_32_Ceil(LHSTy.getSizeInBits())) |
