[llvm] 1474462 - Target: Use getPointerSizeInBits instead of 8 * getPointerSize
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 31 15:49:35 PDT 2022
Author: Matt Arsenault
Date: 2022-03-31T18:49:23-04:00
New Revision: 14744622edac9ea0569f452d7f2f3e01006fbb0a
URL: https://github.com/llvm/llvm-project/commit/14744622edac9ea0569f452d7f2f3e01006fbb0a
DIFF: https://github.com/llvm/llvm-project/commit/14744622edac9ea0569f452d7f2f3e01006fbb0a.diff
LOG: Target: Use getPointerSizeInBits instead of 8 * getPointerSize
Added:
Modified:
llvm/lib/Target/M68k/M68kISelLowering.cpp
llvm/lib/Target/Sparc/SparcISelLowering.cpp
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/M68k/M68kISelLowering.cpp b/llvm/lib/Target/M68k/M68kISelLowering.cpp
index a190057840cdf..250519efd14aa 100644
--- a/llvm/lib/Target/M68k/M68kISelLowering.cpp
+++ b/llvm/lib/Target/M68k/M68kISelLowering.cpp
@@ -173,7 +173,7 @@ MVT M68kTargetLowering::getScalarShiftAmountTy(const DataLayout &DL,
if (Ty.isSimple()) {
return Ty.getSimpleVT();
}
- return MVT::getIntegerVT(8 * DL.getPointerSize(0));
+ return MVT::getIntegerVT(DL.getPointerSizeInBits(0));
}
#include "M68kGenCallingConv.inc"
diff --git a/llvm/lib/Target/Sparc/SparcISelLowering.cpp b/llvm/lib/Target/Sparc/SparcISelLowering.cpp
index ef0c72dacd1cf..6c4ddfb0d5fcd 100644
--- a/llvm/lib/Target/Sparc/SparcISelLowering.cpp
+++ b/llvm/lib/Target/Sparc/SparcISelLowering.cpp
@@ -1454,7 +1454,7 @@ static SPCC::CondCodes FPCondCCodeToFCC(ISD::CondCode CC) {
SparcTargetLowering::SparcTargetLowering(const TargetMachine &TM,
const SparcSubtarget &STI)
: TargetLowering(TM), Subtarget(&STI) {
- MVT PtrVT = MVT::getIntegerVT(8 * TM.getPointerSize(0));
+ MVT PtrVT = MVT::getIntegerVT(TM.getPointerSizeInBits(0));
// Instructions which use registers as conditionals examine all the
// bits (as does the pseudo SELECT_CC expansion). I don't think it
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
index 6d0c0585bb0e1..d2c0a714c45b9 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -80,7 +80,7 @@ static MachineOperand earlyUseOperand(MachineOperand Op) {
SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM,
const SystemZSubtarget &STI)
: TargetLowering(TM), Subtarget(STI) {
- MVT PtrVT = MVT::getIntegerVT(8 * TM.getPointerSize(0));
+ MVT PtrVT = MVT::getIntegerVT(TM.getPointerSizeInBits(0));
auto *Regs = STI.getSpecialRegisters();
More information about the llvm-commits
mailing list